@monstermann/fn
Version:
A utility library for TypeScript.
20 lines • 520 B
TypeScript
//#region src/array/hasAll.d.ts
/**
* `hasAll(array, values)`
*
* Returns `true` if `array` contains all `values`, otherwise returns `false`. Supports iterables for the `values` parameter.
*
* ```ts
* hasAll([1, 2, 3, 4], [2, 3]); // true
* ```
*
* ```ts
* pipe([1, 2, 3, 4], hasAll([2, 3])); // true
* ```
*/
declare const hasAll: {
<T>(values: Iterable<NoInfer<T>>): (target: readonly T[]) => boolean;
<T>(target: readonly T[], values: Iterable<NoInfer<T>>): boolean;
};
//#endregion
export { hasAll };