1.0.1 • Published 7 years ago

pull-skip v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

pull-skip Build Status dependencies Status

Skip the first n bytes of your pull stream.

Example

const pull = require('pull-stream')
const skipBytes = require('pull-skip')

const zeros = (n) => Buffer.alloc(n)
const ones = (n) => Buffer.alloc(n, 1)

pull(
  // stream in bytes <Buffer 00 00 00 01 01 01>
  pull.values([Buffer.concat([zeros(3), ones(3)])]),
  skipBytes(2),
  pull.collect((err, data) => {
    if (err) throw err
    console.log(Buffer.concat(data)) // <Buffer 00 01 01 01>
  })
)

A (╯°□°)╯︵TABLEFLIP side project.

js-standard-style