starry.first

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 first<T = any>(iterable: Iterable<T> = []): T | undefined 

Returns the first element of an iterable.

Returns undefined if the iterable has no elements.

Parameters:

  • iterable: Iterable<T>

Returns: T | undefined

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i starry.first

    Weekly Downloads

    2

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    3.46 kB

    Total Files

    9

    Last publish

    Collaborators

    • seangenabe