pull-skip

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i pull-skip

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • alanshaw