@hamgom95/pick
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

@hamgom95/pick

pick allows extracting multiple object properties by name.

API Documentation

pick(obj, ...props) ⇒

Extract specific properties of object in new object.

Typed that:

  • keys to extract have to exist in obj
  • returned obj has right types for extracted obj

Kind: global function
Returns: Object with extracted properties.

Param Description
obj Object to extract from
...props Properties to extract.

Readme

Keywords

Package Sidebar

Install

npm i @hamgom95/pick

Weekly Downloads

0

Version

2.2.0

License

ISC

Unpacked Size

2.07 kB

Total Files

5

Last publish

Collaborators

  • hamgom95