codetrix - v1.5.0
    Preparing search index...

    Function omit

    • Creates an object without the specified keys.

      Type Parameters

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

      Parameters

      • obj: T

        The source object.

      • keys: K[]

        The keys to omit.

      Returns Omit<T, K>

      A new object without the specified keys.

      omit({ a: 1, b: 2, c: 3 }, ['b']); // { a: 1, c: 3 }