Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Provide a better streaming api in your app.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

node-streamin Build Status

Provide a better streaming api in your app.

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.

requestOptions can be a hash of options passed to request.

Install

npm install streamin

Tests

Tests are written with mocha

npm test

License

MIT

Something went wrong with that request. Please try again.