1.0.0 • Published 2 years ago

fast-json-data v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas