UNPKG

augmented-array

Version:

Extends Array methods adding: - combine(array): Object - diff(array): Array - indexByKey(arrayOfObjects): objectOfObjects - intersect(array): Array - pluck(field): Array - range(elements): Array - range(begin, end): Array - subtract(array): Array

16 lines (15 loc) 436 B
export {}; declare global { interface ReadonlyArray<T> { /** * @returns object with keys from the first array and values from the second array */ combine<T>(array: ReadonlyArray<T>): object; } interface Array<T> { /** * @returns object with keys from the first array and values from the second array */ combine<T>(array: ReadonlyArray<T>): object; } }