1.0.4 • Published 8 years ago

read-source-stream v1.0.4

Weekly downloads
11
License
MIT
Repository
github
Last release
8 years ago

read-source-stream npmjs.com The MIT License

Streaming read of local file or remote url.

code climate standard code style travis build status coverage status dependency status

Install

npm i read-source-stream --save

Usage

For more use-cases see the tests

  • <fp> {String} filepath or remote url
  • [opts] {Object} options passed to fs.createReadStream and simple-get
  • returns {Stream} Readable stream

Example

var read = require('read-source-stream')

// current working directory `package.json` file
read('package.json').pipe(process.stdout)

// package.json of `got` module
read('package.json', {cwd: 'node_modules/got'}).pipe(process.stdout)

// also works with CDN-like urls 
read('//todomvc.com').pipe(process.stdout)

// http and https urls
read('https://github.com').pipe(process.stdout)
read('www.tunnckocore.tk').pipe(process.stdout)

Related

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github