getFirstFromIterable
Public Function
Get the first item from an iterable Set or Map.
Example
const A = getFirstItem(new Set([1, 2, 3])) // 1
const B = getFirstItem(
new Map([
['a', 1],
['b', 2],
])
) // 1
Parameters
Name | Description |
---|---|
|
|
Returns
T