mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
d102a10235
* refactor: import from `@std/assert` * update
23 lines
681 B
TypeScript
23 lines
681 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
// This module is browser compatible.
|
|
|
|
/**
|
|
* Provides tools for working with
|
|
* {@link https://code.visualstudio.com/docs/languages/json#_json-with-comments | JSONC}
|
|
* (JSON with comments).
|
|
*
|
|
* Currently, this module only provides a means of parsing JSONC. JSONC
|
|
* serialization is not yet supported.
|
|
*
|
|
* ```ts
|
|
* import { parse } from "@std/jsonc";
|
|
* import { assertEquals } from "@std/assert";
|
|
*
|
|
* assertEquals(parse('{"foo": "bar", } // comment'), { foo: "bar" });
|
|
* assertEquals(parse('{"foo": "bar", } /* comment *\/'), { foo: "bar" });
|
|
* ```
|
|
*
|
|
* @module
|
|
*/
|
|
export * from "./parse.ts";
|