import { omit } from "https://deno.land/x/molt@0.17.2/lib/std/collections.ts";
Creates a new object by excluding the specified keys from the provided object.
Examples
Example 1
Example 1
import { omit } from "https://deno.land/std@0.224.0/collections/omit.ts";
import { assertEquals } from "https://deno.land/std@0.224.0/assert/assert_equals.ts";
const obj = { a: 5, b: 6, c: 7, d: 8 };
const omitted = omit(obj, ["a", "c"]);
assertEquals(omitted, { b: 6, d: 8 });
Type Parameters
K extends keyof T