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
| Parameter | Type |
|---|---|
collection | Iterable<string, any, any> | Each<string, unknown> |
defaultOrBlock | V | ((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
| Parameter | Type |
|---|---|
collection | Iterable<T, any, any> | Each<T, unknown> |
defaultOrBlock | V | ((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
| Parameter | Type |
|---|---|
collection | Iterable<T, any, any> | Each<T, unknown> |
Returns
Enumerator<T>