Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

derhuerst/browser-fs-read-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browser-fs-read-stream

Deprecated. I decided not to statically transform the code, but to make fs-read-stream-over-http isomorphic.

npm version build status ISC-licensed chat on gitter

Browserify transform to replace fs.createReadStream by fs-read-stream-over-http, which uses HTTP GET requests.

Installing

npm install --save-dev browser-fs-read-stream

Usage

// index.js

const fs = require('fs')

fs.createReadStream('foo.txt', {encoding: 'utf8'})
.on('data', console.log)
browserify -t browser-fs-read-stream index.js >bundle.js
// bundle.js

// …
const fs = require('fs')

fsReadStreamOverHttp('foo.txt', {encoding: 'utf8'})
.on('data', console.log)
// …

Contributing

If you have a question or have difficulties using browser-fs-read-stream, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.