Spaces:
Paused
Paused
Download node_modules/@huggingface/hub/src/utils/pick.ts from Leon4gr45/nova-header-nav: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/pick.ts
- Command line
-
hf download hf://spaces/Leon4gr45/nova-header-nav/node_modules/@huggingface/hub/src/utils/pick.ts
-
curl -L -o pick.ts https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/pick.ts
302 Bytes
| /** | |
| * Return copy of object, only keeping whitelisted properties. | |
| */ | |
| export function pick<T, K extends keyof T>(o: T, props: K[] | ReadonlyArray<K>): Pick<T, K> { | |
| return Object.assign( | |
| {}, | |
| ...props.map((prop) => { | |
| if (o[prop] !== undefined) { | |
| return { [prop]: o[prop] }; | |
| } | |
| }), | |
| ); | |
| } | |