Download Reactive-Resume/libs/utils/src/namespaces/object.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Reactive-Resume/libs/utils/src/namespaces/object.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Reactive-Resume/libs/utils/src/namespaces/object.ts
-
curl -L -o object.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/Reactive-Resume/libs/utils/src/namespaces/object.ts
249 Bytes
| export const exclude = <T, Key extends keyof T>(object: T, keys: Key[]): Omit<T, Key> => { | |
| if (!object) return object; | |
| return Object.fromEntries( | |
| Object.entries(object).filter(([key]) => !keys.includes(key as Key)), | |
| ) as Omit<T, Key>; | |
| }; | |