@kt3k/jsonc
v0.0.2
Published
An experiment to use jsr in npm module
Downloads
1
Readme
An experiment to use jsr in npm module
Usage
Set .npmrc
with:
@jsr:registry=https://npm.jsr.io
And then:
npm install @kt3k/jsonc
This installs the module with the dependency to jsr:@std/jsonc.
Now you can import parse
from the module, which is actually implemented in @std/jsonc
import { parse } from "@kt3k/jsonc";
const obj = parse(`{
// comment
"foo": 42,
"bar": 43, // <- trailing comma
}`);
console.log(obj);
Save this as test.mjs
, and it executes like:
$ node test.mjs
{ foo: 42, bar: 43 }