@basic-streams/skip
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@basic-streams/skip

skip<T>(n: number, stream: Stream<T>): Stream<T>

Creates a stream containing values from the given stream except for the first n values.

import ofMany from "@basic-streams/of-many"
import skip from "@basic-streams/skip"

const stream = ofMany([1, 2, 3], 5000)

const result = skip(2, stream)

result(x => {
  console.log(x)
})

// > 3

// stream: ____1____2____3
// result: ______________3

Readme

Keywords

Package Sidebar

Install

npm i @basic-streams/skip

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

3.86 kB

Total Files

8

Last publish

Collaborators

  • pozadi