pick allows extracting multiple object properties by name.
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. |