Skip to content

unctionjs/withoutKeys

Repository files navigation

@unction/withoutKeys

Tests Stability Dependencies

Array => Record<string | number | symbol, B> | Map<A, B> => Record<string | number | symbol, B> | Map<A, B>

Takes a enumerable that has keys and returns the same type where all the given keys don't exist.

withoutKeys(["a", "b", "c"])({b: 2, d: 3}) // {d: 3}
withoutKeys(["a", "b", "c"])(new Map([["b", 2], ["d", 3]])) // Map([["d", 3]]))