starry.last

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

Returns the last element of iterable.

Returns undefined if the iterable has no elements.

Parameters:

  • iterable - Iterable<T>

Returns: T | undefined

Package Sidebar

Install

npm i starry.last

Weekly Downloads

0

Version

4.0.1

License

MIT

Unpacked Size

9.35 kB

Total Files

12

Last publish

Collaborators

  • seangenabe