1.1.2 • Published 12 months ago

json-array-writable-stream v1.1.2

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
12 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.2

12 months ago

1.1.1

2 years ago

1.0.3

2 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago