@nodejs-loaders/json5
v1.2.0
Published
Extend node to support JSON5 via customization hooks.
Downloads
18
Readme
Nodejs Loaders: json5
Usage
$ npm i -D @nodejs-loaders/json5$ node --import @nodejs-loaders/json5 main.jsSee README.md in the repository's root for more details.
Environments: dev, test
Compatible APIs:
To import a JSON5 file in Node.js, it must have a .json5 file extension and an import attribute in the import statement (for consistency with Node.js's support for json imports):
import data from './data.json5' with { type: 'json5' };
// OR
const data = await import('./data.json5', { with: { type: 'json5' } });{
// JSON5 file example
key: "value",
number: 42,
// Comment line
}.json5
