A transform stream that passes through the first n elements and discards the rest
Example
Outputs [1, 2, 3, 4, 5]
:
var Take = five = out = ; five; five; five;five;five;five;five;five;five; // Returns false, signalling backpressure
Limitations
- Currently supports only objectMode, no strings or Buffers
- Doesn't produce backpressure immediately due to a node bug