1.0.1 • Published 3 months ago

pull-pushable-linked v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

pull-pushable-linked

A pull-stream source with a pushable interface using a linked list.

Interface

import PullPushable from 'pull-pushable-linked'

const {
  source, // pull-stream source (allows not exposing other methods to consumers)
  push, // (chunk) => void
  end, // ([error]) => void
  getList, // () => ({ head, tail }),
} = PullPushable([onEnd])

Example

import PullPushable from 'pull-pushable-linked'
import PullStream from 'pull-stream
const {pull, drain} = PullStream

const pushable = PullPushable((err) => {
  console.log('Ended', err)
})

pull(pushable, drain(console.log))

pushable.push('Hello')
pushable.end()
1.0.1

3 months ago

1.0.0

5 months ago