Spaces:
Configuration error
Configuration error
Download frontend/src/utils/get-random-key.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 187 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/get-random-key.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/utils/get-random-key.ts
-
curl -L -o get-random-key.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/utils/get-random-key.ts
187 Bytes
| export const getRandomKey = (obj: Record<string, string>) => { | |
| const keys = Object.keys(obj); | |
| const randomKey = keys[Math.floor(Math.random() * keys.length)]; | |
| return randomKey; | |
| }; | |