Skip to content

Instantly share code, notes, and snippets.

@timhudson
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhudson/3f9269eb932dfa22b0af to your computer and use it in GitHub Desktop.
Save timhudson/3f9269eb932dfa22b0af to your computer and use it in GitHub Desktop.
json-object-write-stream
var jsonStream = jsonObjectWriteStream()
fs.createReadStream(‘path/to/description’)
.pipe(jsonStream.createAttributeWriteStream(’description’))
jsonStream.pipe(process.stdout)
// {“description”: “whatever was inside the path/to/description file”}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment