0.1.1 • Published 1 year ago

dumpjson v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

DumpJSON

Dump large Javascript arrays to JSON file without using too much memory.

If you're looking for a way to read from JSON file into memory, check out jsonstrom.

Install

npm i dumpjson

Usage

const dumpjson = require('dumpjson')

// Filename to dump to
const writer = dumpjson('file.json')

// Very large array
const largeArray = [...]
for (const item of largeArray) {
  dumpjson.write(item)
}

// Indicate end of stream
dumpjson.end()

// Await if you need to wait for all writes to finish
await dumpjson.end()

MIT Licensed. Enjoy!

0.1.1

1 year ago

0.1.0

1 year ago