Skip to content

unctionjs/forEach

Repository files navigation

@unction/forEach

Tests Stability Dependencies

MapperFunctionType<A, B> => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string

Takes any kind of enumerable and figures out the best way to iterate over it.

forEach((x) => y)([])
forEach((x) => y)(new Map)
forEach((x) => y)({})