Spaces:
Sleeping
Sleeping
Download gui/frontend/node_modules/escalade/sync/index.js from BrianLov/guiBackend: direct link, hf CLI and curl.
- Browser
- Download file 416 Bytes
-
https://huggingface.co/spaces/BrianLov/guiBackend/resolve/main/gui/frontend/node_modules/escalade/sync/index.js
- Command line
-
hf download hf://spaces/BrianLov/guiBackend/gui/frontend/node_modules/escalade/sync/index.js
-
curl -L -o index.js https://huggingface.co/spaces/BrianLov/guiBackend/resolve/main/gui/frontend/node_modules/escalade/sync/index.js
416 Bytes
| const { dirname, resolve } = require('path'); | |
| const { readdirSync, statSync } = require('fs'); | |
| module.exports = function (start, callback) { | |
| let dir = resolve('.', start); | |
| let tmp, stats = statSync(dir); | |
| if (!stats.isDirectory()) { | |
| dir = dirname(dir); | |
| } | |
| while (true) { | |
| tmp = callback(dir, readdirSync(dir)); | |
| if (tmp) return resolve(dir, tmp); | |
| dir = dirname(tmp = dir); | |
| if (tmp === dir) break; | |
| } | |
| } | |