Neanderthals Programming Machines

npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

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

install

npm i pull-skip

Downloadsweekly downloads

1

version

1.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability