Socket
Socket
Sign inDemoInstall

@types/object.omit

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/object.omit

TypeScript definitions for object.omit


Version published
Weekly downloads
416K
increased by9.51%
Maintainers
1
Install size
3.87 kB
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/object.omit

Summary

This package contains type definitions for object.omit (https://github.com/jonschlinkert/object.omit).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object.omit.

index.d.ts

type Omit<GType, GKeys extends keyof GType> = Pick<GType, Exclude<keyof GType, GKeys>>;

/**
 * Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument."
 *
 * ```ts
 * omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c'])
 * //=> { b: 'b' }
 * ```
 *
 * @param object
 * @param keys
 */

declare function omit<GObject extends object, GKey extends keyof GObject>(
    object: GObject,
    key: GKey | GKey[],
): Omit<GObject, GKey>;

declare function omit<GObject extends object, GKey extends keyof GObject>(
    object: GObject,
    fn: (value: GObject[GKey], key: GKey, obj: GObject) => boolean,
): { [key: string]: any };

export = omit;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Ifiok Jr..

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc