npm.io
0.2.0 • Published 4 years ago

jsonc-register

Licence
MIT
Version
0.2.0
Deps
2
Size
2 kB
Vulns
0
Weekly
0
Stars
80

jsonc-register

json-register hooks into Node's require function to load .json or .jsonc files that support comments.

const { register } = require('jsonc-register');

register();
const a = require('/path/to/my-file.json');
const b = require('/path/to/my-file.jsonc');

Keywords