bare-stream
Streaming data for JavaScript
Documented against
v2.13.4stable
bare-stream — Streaming data for JavaScript.
Mirrors the Node.js stream module: the classic Readable/Writable/Duplex/Transform classes are backed by streamx, while bare-stream/web provides a node:stream/web-compatible implementation of the WHATWG Streams Standard.
npm i bare-streamUsage
const { Readable } = require('bare-stream')
const stream = new Readable({
read(size) {
// Push data, then push `null` to signal the end
this.push('hello')
this.push('world')
this.push(null)
}
})
stream.on('data', (data) => console.log(data))API
Stream basics
Stream utilities
Readable streams
Writable streams
Duplex and Transform streams
Events
Options
Readable
Writable
Duplex
Transform
Types
bare-stream/web
ReadableStreamDefaultReader
ReadableStreamDefaultController
ReadableStream
QueuingStrategy
WritableStreamDefaultWriter
WritableStreamDefaultController
WritableStream
TransformStreamDefaultController
TransformStream
Functions
Types
Classes
See also
- It's pure JavaScript and underpins much of the
bare-*ecosystem—bare-fs,bare-tcp, and others return its streams. - Bare modules — the full
bare-*catalog. - Bare runtime API — the runtime these modules extend.