starry.first
4.0.0 • Public • Published Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
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:
Returns: T | undefined
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 4.0.0
2
Version History
Package Sidebar
Install
Weekly Downloads