@basic-streams/skip

skip operator for basic-streams

Usage no npm install needed!

<script type="module">
  import basicStreamsSkip from 'https://cdn.skypack.dev/@basic-streams/skip';
</script>

README

@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