node package manager

readsy

readsy

Read stream wrapper that supports async initialization.

Build Status

npm install readsy

var rs = readsy(init)

var readsy = require('readsy')
 
var readStream = readsy((cb) => {
  setTimeout(() => {
    cb(null, fs.createReadStream('/dev/urandom'))
  }, 100)
})
 
readStream.pipe(fs.createWriteStream('/dev/null'))

License

MIT