Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/omit/docs/types/index.d"

Index

Functions

Functions

Export assignment omit

  • omit(obj: any, keys: string | Array<string>): Object
  • Returns a partial object copy excluding specified keys.

    Notes

    • The function returns a shallow copy.
    • The function ignores non-existent keys.
    • The function only copies own properties. Hence, the function never copies inherited properties.

    Parameters

    • obj: any

      source object

    • keys: string | Array<string>

      keys to exclude

    Returns Object

    new object

    Example

    var obj1 = {
        'a': 1,
        'b': 2
    };
    
    var obj2 = omit( obj1, 'b' );
    // returns { 'a': 1 }