1.1.1 • Published 8 months ago

json-array-writable-stream v1.1.1

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
8 months ago

nodejs_json_array_writable_stream

Packing objects into JSON array.

var json_array_writable_stream = require("json-array-writable-stream")
var stream = json_array_writable_stream()
stream.write(1)
stream.write("string")
stream.write(null)
stream.write({a:"Aa"})
stream.write(void(0)) // Will ignore undefined by default
stream.end()
stream.pipe(process.stdout) // [1,"string",null,{"a":"Aa"}]

Available options:

var stream = json_array_writable_stream(
{
    spaces: 0,
    opening: "[",
    closing: "]",
    replacer: function(key, val) { return (key == "key1") ? "Replacement value." : val },
    separator: ",\n",
    replace_undefined_by: null // In case you want these keys to show up in your JSON.
})
1.1.1

8 months ago

1.0.3

10 months ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago