fast-json-data
v1.0.0
Published
Fast JSON data disk read/write.
Downloads
22
Readme
Fast JSON data disk read/write.
const schema = [[Literal, [ 'id', 'rev', 'name', 'homepage', ['versions', ['', [ 'name', 'gitHead', ['os', [Literal]], ['cpu', [Literal]], ['engines', ['']], ['dist', [ 'shasum', 'tarball', 'unpackedSize', ]], ['dependencies', [ '*', ]], ]]],
['time', ['*']], ]]]
...
// packumentCache is a Map<string, Packument>
await fsp.writeFile( options.packumentCachePath, stringify(schema, [...packumentCache]), 'utf-8' )
...
json = parse(schema, await fsp.readFile(options.packumentCachePath, 'utf-8'))
API
Contributing
All contributions are welcome!
License
MIT © 2022 stagas
