Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/files/index.d.ts>indexBy

Faster and smaller alternative to Ramda
Latest
function indexBy
import { indexBy } from "https://deno.land/x/rambda@9.4.1/files/index.d.ts";

Type Parameters

T
optional
K extends string | number = string

Parameters

condition: (key: T) => K
list: T[]

Returns

[key in K]: T

Type Parameters

T
optional
K extends string | number | undefined = string

Parameters

condition: (key: T) => K
list: T[]

Returns

[key in NonNullable<K>]?: T

Type Parameters

T
optional
K extends string | number = string

Parameters

condition: (key: T) => K

Returns

(list: T[]) => [key in K]: T

Type Parameters

T
optional
K extends string | number | undefined = string

Parameters

condition: (key: T) => K | undefined

Returns

(list: T[]) => [key in NonNullable<K>]?: T

Parameters

condition: string
list: T[]

Returns

{ [key: string]: T; }

Parameters

condition: string

Returns

(list: T[]) => { [key: string]: T; }