starry.take

4.0.0 • Public • Published

Member of the starry suite—modular functions for iterable objects.

npm node

Status

Applies to the whole suite.

Build Status Coverage Status

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 - when count is not a finite number.

/starry.take/

    Package Sidebar

    Install

    npm i starry.take

    Weekly Downloads

    2

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    6.13 kB

    Total Files

    9

    Last publish

    Collaborators

    • seangenabe