Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
consume a stream of objects and save them to a file
JavaScript Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
test
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

object-stream-to-fs

Consume a stream of objects and save them to a file.

Specify a path to the target file.

build status

example

save objects to a file:

var s = objectStreamToFS('/tmp/test-file');

var d = dump('mongodb://127.0.0.1/test_db', 'testcollection');

d.pipe(s);

s.on('done', function(){
  console.log("the object stream has been consumed!")
});

methods

var objectStreamToFS = require('object-stream-to-fs')

var s = objectStreamToFS(filePath)

Consume the entire stream of objects.

The returned object s is a Stream.

events

d.on('done', function () {})

Emitted when all writes have been completed and the object stream has been consumed.

install

With npm do:

npm install object-stream-to-fs

license

MIT

Something went wrong with that request. Please try again.