@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 672 B
TypeScript
//#region src/set/hasNone.d.ts
/**
* `hasNone(target, values)`
*
* Checks if the `target` set contains none of the specified `values` from an iterable. Returns `true` if no values exist in the set, `false` otherwise.
*
* ```ts
* hasNone(new Set([1, 2, 3]), [4, 5]); // true
* hasNone(new Set([1, 2, 3]), [3, 4]); // false
* ```
*
* ```ts
* pipe(new Set([1, 2, 3]), hasNone([4, 5])); // true
* pipe(new Set([1, 2, 3]), hasNone([3, 4])); // false
* ```
*/
declare const hasNone: {
<T>(values: Iterable<NoInfer<T>>): (target: ReadonlySet<T>) => boolean;
<T>(target: ReadonlySet<T>, values: Iterable<NoInfer<T>>): boolean;
};
//#endregion
export { hasNone };