Library API
    Preparing search index...

    Function omit

    • Mutates an object or array by removing specified properties or indices. If no keys are provided, it removes all properties (like a clear operation).

      Type Parameters

      Parameters

      • obj: T

        The object or array to mutate

      Returns T

      The mutated object reference

      omit({ a: 1, b: 2 }, 'a'); // { b: 2 }
      
    • Mutates an object or array by removing specified properties or indices. If no keys are provided, it removes all properties (like a clear operation).

      Type Parameters

      Parameters

      • obj: T

        The object or array to mutate

      • ...keys: PropertyKey[]

        The keys or indices to omit

      Returns T

      The mutated object reference

      omit({ a: 1, b: 2 }, 'a'); // { b: 2 }