1.0.3 • Published 10 years ago

save-to v1.0.3

Weekly downloads
177
License
MIT
Repository
github
Last release
10 years ago

Save to __ Build Status

Save a stream to a file.

API

var saveTo = require('save-to')
var stream = fs.createReadStream('some file.txt')

saveTo(stream, 'destination.txt', function (err, destination) {
  if (err) throw err
})

saveTo(stream , destination, callback)

  • stream is the source stream, for example a request.
  • destination is the path where the stream will be saved.
  • callback(err, destination)

The options are:

  • destination - if you don't specify destination as an argument.
  • length - expected byte length. Throws an error if it does not match the stream's length.
  • limit - maximum byte length. Throws an error if the stream is larger than this size.
1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.1.0

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago