UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

35 lines 1.06 kB
import { LazyResult } from './_reduceLazy'; /** * Excludes the values from `other` array. * @param array - the source array * @param other - the values to exclude * @signature * P.difference(array, other) * @example * P.difference([1, 2, 3, 4], [2, 5, 3]) // => [1, 4] * @data_first * @category Array * @pipeable */ export declare function difference<T>(array: readonly T[], other: readonly T[]): T[]; /** * Excludes the values from `other` array. * @param other the values to exclude * @signature * P.difference(other)(array) * @example * P.difference([2, 5, 3])([1, 2, 3, 4]) // => [1, 4] * P.pipe( * [1, 2, 3, 4, 5, 6], // only 4 iterations * P.difference([2, 3]), * P.take(2) * ) // => [1, 4] * @data_last * @category Array * @pipeable */ export declare function difference<T, K>(other: readonly T[]): (array: readonly K[]) => readonly T[]; export declare namespace difference { function lazy<T>(other: readonly T[]): (value: T) => LazyResult<T>; } //# sourceMappingURL=difference.d.ts.map