ChemPare Documentation - v0.0.0
    Preparing search index...
    • Omit properties from an object.

      Type Parameters

      • T extends object
      • K extends string | number | symbol

      Parameters

      • data: T

        The object to omit properties from.

      • path: MaybeArray<K>

        The property or properties to omit.

      Returns Omit<T, K>

      The object with the specified properties omitted.

      const data = {
      name: "John",
      age: 30,
      city: "New York",
      };
      omit(data, "age"); // { name: "John", city: "New York" }
      omit(data, ["age", "city"]); // { name: "John" }