@frm/jsonc
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

JSONC

JSON with comments polyfill

import * as JSON from "@frm/jsonc";

var str = `
{
    //test
    /*test*/
    "test":"test"
}
`;
var test = JSON.parse(str) // => { test: "test" }
import { polyfill, noConflict } from "@frm/jsonc";
polyfill();

var str = `
{
    //test
    /*test*/
    "test":"test"
}
`;
var test = JSON.parse(str) // => { test: "test" }

noConflict();
JSON.parse(str);  // throw Error

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @frm/jsonc

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    5.44 kB

    Total Files

    5

    Last publish

    Collaborators

    • koumuyou