1.0.0 • Published 2 years ago
fast-json-data v1.0.0
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
1.0.0
2 years ago