0.1.0 • Published 6 years ago

read-text-stream v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

read-text-stream npm-version

Consume a readable stream with utf-8 encoding.

Usage

const readTextStream = require('read-text-stream')

fetch('some-url').then(res => readTextStream(res.body, (text, bytes) => {
  console.log(`Got ${bytes} bytes text: ${text}`)
})).then(fullText => {
  console.log(`Done loading.`)
})

License

MIT @ Amio