Skip to content

Function: values()

values<T>(source): Iterable<T>

Normalizes a source to an iterable of its T values, so Maps are treated uniformly with arrays/sets: a Map yields its values (matching Collection’s value-typed T), any other iterable yields itself. This is what sequence consumes, so a Map contributes values everywhere rather than [key, value] entries.

T

Iterable<T, any, any> | ReadonlyMap<unknown, T>

Iterable<T>