starry.take
v4.0.0
Published
Member of the starry suite—modular functions for iterable objects.
Downloads
3
Maintainers
Readme
Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
function take<T = any>(
iterable: Iterable<T>,
count: number = 1
): Iterable<T>
Returns count
number of elements from the beginning of the iterable.
Parameters:
- iterable -
Iterable<T>
- count -
number
. Default:1
Returns: Iterable<T>
Throws:
TypeError
- whencount
is not a finite number.