UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines 653 B
//#region src/set/hasAll.d.ts /** * `hasAll(target, values)` * * Checks if the `target` set contains all of the specified `values` from an iterable. Returns `true` if all values exist, `false` otherwise. * * ```ts * hasAll(new Set([1, 2, 3]), [1, 2]); // true * hasAll(new Set([1, 2, 3]), [1, 4]); // false * ``` * * ```ts * pipe(new Set([1, 2, 3]), hasAll([1, 2])); // true * pipe(new Set([1, 2, 3]), hasAll([1, 4])); // false * ``` */ declare const hasAll: { <T>(values: Iterable<NoInfer<T>>): (target: ReadonlySet<T>) => boolean; <T>(target: ReadonlySet<T>, values: Iterable<NoInfer<T>>): boolean; }; //#endregion export { hasAll };