UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

48 lines 888 B
//#region src/map/hasNone.d.ts /** * `hasNone(map, keys)` * * Checks if `map` contains none of the specified `keys`. This function supports iterables. * * ```ts * hasNone( * new Map([ * ["a", 1], * ["b", 2], * ]), * ["c", "d"], * ); // true * * hasNone( * new Map([ * ["a", 1], * ["b", 2], * ]), * ["a", "c"], * ); // false * ``` * * ```ts * pipe( * new Map([ * ["a", 1], * ["b", 2], * ]), * hasNone(["c", "d"]), * ); // true * * pipe( * new Map([ * ["a", 1], * ["b", 2], * ]), * hasNone(["a", "c"]), * ); // false * ``` */ declare const hasNone: { <K, V>(keys: Iterable<NoInfer<K>>): (target: ReadonlyMap<K, V>) => boolean; <K, V>(target: ReadonlyMap<K, V>, keys: Iterable<NoInfer<K>>): boolean; }; //#endregion export { hasNone };