Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/tsafe/exclude.ts

🔩 The missing TypeScript utils
Go to Latest
import * as tsafe from "https://deno.land/x/tsafe@v1.6.5/exclude.ts";

Functions

Return a function to use as Array.prototype.filter argument to exclude one or many primitive value element from the array. Ex: ([ "a", "b", "c" ] as const).filter(exclude("a")) return ("b" | "c")[] Ex: ([ "a", "b", "c", "d"] as const).filter(exclude(["a", "b"]) gives ("c" | "d")[]