pick-omit
The two missing object methods we always need.
npm i pick-omit
|
pnpm add pick-omit
|
yarn add pick-omit
|
API
# filter
(obj, fn) – Filter object with filter function fn
.
src/pick-omit.ts#L12 # nonNull
(obj) – Filter out nullish values from object.
src/pick-omit.ts#L23 # omit
(obj, props) – Create a new object with certain properties omitted.
src/pick-omit.ts#L46 # pick
(obj, props) – Pick properties from an object into a new object.
src/pick-omit.ts#L33 Credits
- everyday-types by stagas – Everyday utility types
Contributing
All contributions are welcome!