1.1.0 • Published 8 months ago

@nodejs-loaders/json5 v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Nodejs Loaders: json5

npm version unpacked size

Environments: dev, test

Compatible APIs: module.register

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
1.1.0

8 months ago

1.0.0

9 months ago