0.2.2 • Published 10 years ago

streamin v0.2.2

Weekly downloads
4
License
-
Repository
github
Last release
10 years ago

node-streamin Build Status

Provide a better streaming api for your module.

Usage

var streamin = require('streamin');

// `io` can be a path to a file, a url, or a stream
var stream = streamin(io);

That's the gist of it. With this you can give your code a more conveniet API by allowing streams to be passed into your function and also consider the common use cases of files and urls as inputs or outputs.

API

streamin(io, requestOptions)

If io is a path to a file, it will return a stream that points to a local file. If it's a url, a stream from a remote request will be returned. If it detects that io is already a stream, it returns it. Will also decompress a gzip/deflate compressed http stream.

requestOptions can be a hash of options passed to request.

Install

npm install streamin

Tests

Tests are written with mocha

npm test

License

MIT

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

11 years ago

0.1.1

12 years ago

0.1.0

12 years ago