pick (Functional Programming) es-toolkit
Creates a function that keeps only the given keys of an object. Use it with pipe.
Info
Usage
pick returns a new object that contains only the specified keys from the input object. Keys that are not present on the input are skipped.
Parameters
keysreadonly K[]required
The keys to copy into the new object.
Returns
A function that maps an object T to a new object with only the picked keys.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.