Download scripts/crawler-utils.js from zitons/logup-re: direct link, hf CLI and curl.
- Browser
- Download file 284 Bytes
-
https://huggingface.co/spaces/zitons/logup-re/resolve/main/scripts/crawler-utils.js
- Command line
-
hf download hf://spaces/zitons/logup-re/scripts/crawler-utils.js
-
curl -L -o crawler-utils.js https://huggingface.co/spaces/zitons/logup-re/resolve/main/scripts/crawler-utils.js
284 Bytes
| ; | |
| // 小工具:随机整数(含端点)与 sleep | |
| function randomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } | |
| function sleep(ms) { | |
| return new Promise((resolve) => setTimeout(resolve, ms)); | |
| } | |
| module.exports = { randomInt, sleep }; | |