Spaces:
Paused
Paused
Download src/lib/tools.js from clash-linux/api: direct link, hf CLI and curl.
- Browser
- Download file 244 Bytes
-
https://huggingface.co/spaces/clash-linux/api/resolve/552a5483d3fee39cf2b661ffa693972910fad0c8/src/lib/tools.js
- Command line
-
hf download hf://spaces/clash-linux/api@552a5483d3fee39cf2b661ffa693972910fad0c8/src/lib/tools.js
-
curl -L -o tools.js https://huggingface.co/spaces/clash-linux/api/resolve/552a5483d3fee39cf2b661ffa693972910fad0c8/src/lib/tools.js
244 Bytes
| const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)) | |
| function isJsonString(str) { | |
| try { | |
| JSON.parse(str) | |
| return true | |
| } catch (e) { | |
| return false | |
| } | |
| } | |
| module.exports = { | |
| sleep, | |
| isJsonString | |
| } |