Home Manual Reference Source

Function

Static Public Summary
public

all(a: ArrayLike, i: number, j: number): boolean

All.

public

any(a: ArrayLike, i: number, j: number): boolean

Any.

public

argmax(compare: Function, a: ArrayLike, i: number, j: number): number

Argmax.

public

argmin(compare: Function, a: ArrayLike, i: number, j: number): number

Argmin.

public

max(compare: Function, a: ArrayLike, i: number, j: number): any

Max.

public

min(compare: Function, a: ArrayLike, i: number, j: number): any

Min.

public

reduce(accumulator: Function, a: ArrayLike, i: number, j: number, initializer: any): any

Reduce.

public

sum(a: ArrayLike, i: number, j: number, zero: number | bigint): number | bigint

Sum.

Static Public

public all(a: ArrayLike, i: number, j: number): boolean source

All.

Params:

NameTypeAttributeDescription
a ArrayLike
i number
j number

Return:

boolean

public any(a: ArrayLike, i: number, j: number): boolean source

Any.

Params:

NameTypeAttributeDescription
a ArrayLike
i number
j number

Return:

boolean

public argmax(compare: Function, a: ArrayLike, i: number, j: number): number source

Argmax.

Params:

NameTypeAttributeDescription
compare Function
a ArrayLike
i number
j number

Return:

number

public argmin(compare: Function, a: ArrayLike, i: number, j: number): number source

Argmin.

Params:

NameTypeAttributeDescription
compare Function
a ArrayLike
i number
j number

Return:

number

public max(compare: Function, a: ArrayLike, i: number, j: number): any source

Max.

Params:

NameTypeAttributeDescription
compare Function
a ArrayLike
i number
j number

Return:

any

public min(compare: Function, a: ArrayLike, i: number, j: number): any source

Min.

Params:

NameTypeAttributeDescription
compare Function
a ArrayLike
i number
j number

Return:

any

public reduce(accumulator: Function, a: ArrayLike, i: number, j: number, initializer: any): any source

Reduce.

Applies the accumulator function iteratively on the last return value of the accumulator and the current value in the array. The initial last return value of the accumulator is the initializer parameter.

Params:

NameTypeAttributeDescription
accumulator Function
a ArrayLike
i number
j number
initializer any

Return:

any

public sum(a: ArrayLike, i: number, j: number, zero: number | bigint): number | bigint source

Sum.

Params:

NameTypeAttributeDescription
a ArrayLike
i number
j number
zero number | bigint

Return:

number | bigint