API · Select

drop()

Skip the first `n` successful values and emit the rest.

Signature

drop(n: number): Exstream<T, C>

Example

exstream(['header', 'a', 'b']).drop(1).valuesSync()
// ['a', 'b']

Parameters

n

Type numberRequired

Passed to slice(n, Infinity). It is parsed with parseFloat. Negative values emit from the beginning; fractions skip indexes lower than that fraction and therefore round up in effect.

Behavior

drop() counts successful values only. Existing record errors pass through immediately and do not advance the index. Retained values preserve order and context. The operator is synchronous, does not buffer independently, and remains lazy and backpressure-aware.

NaN and Infinity are invalid because start must be a number below the infinite end. Use drop(0) to keep every value; unlike slice(0, Infinity), it delegates to that identity case.

Forms

stream.drop(1)
exstream.pipeline().drop(1)
exstream.drop(1, stream)
stream.through(exstream.drop(1))

slice(), take(), skipErrors()