Skip to content

Documentation


Documentation / @blazetrails/activesupport / indexWith

Function: indexWith() ​

Call Signature ​

indexWith<V>(collection, defaultOrBlock): Record<string, V>

Defined in: packages/activesupport/lib/core-ext/enumerable.ts:79

Type Parameters ​

Type Parameter
V

Parameters ​

ParameterType
collectionIterable<string, any, any> | Each<string, unknown>
defaultOrBlockV | ((elem) => V)

Returns ​

Record<string, V>

Call Signature ​

indexWith<T, V>(collection, defaultOrBlock): Hash<T, V> | Record<string, V>

Defined in: packages/activesupport/lib/core-ext/enumerable.ts:83

Type Parameters ​

Type Parameter
T
V

Parameters ​

ParameterType
collectionIterable<T, any, any> | Each<T, unknown>
defaultOrBlockV | ((elem) => V)

Returns ​

Hash<T, V> | Record<string, V>

Call Signature ​

indexWith<T>(collection): Enumerator<T>

Defined in: packages/activesupport/lib/core-ext/enumerable.ts:87

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
collectionIterable<T, any, any> | Each<T, unknown>

Returns ​

Enumerator<T>