Download node_modules/bottleneck/scripts/assemble_lua.js from mikmc5/aistats: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/spaces/mikmc5/aistats/resolve/main/node_modules/bottleneck/scripts/assemble_lua.js
- Command line
-
hf download hf://spaces/mikmc5/aistats/node_modules/bottleneck/scripts/assemble_lua.js
-
curl -L -o assemble_lua.js https://huggingface.co/spaces/mikmc5/aistats/resolve/main/node_modules/bottleneck/scripts/assemble_lua.js
571 Bytes
| var fs = require('fs') | |
| var input = __dirname + '/../src/redis' | |
| var loaded = {} | |
| var promises = fs.readdirSync(input).map(function (file) { | |
| return new Promise(function (resolve, reject) { | |
| fs.readFile(input + '/' + file, function (err, data) { | |
| if (err != null) { | |
| return reject(err) | |
| } | |
| loaded[file] = data.toString('utf8') | |
| return resolve() | |
| }) | |
| }) | |
| }) | |
| Promise.all(promises) | |
| .then(function () { | |
| console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2)) | |
| }) | |
| .catch(function (err) { | |
| console.error(err) | |
| process.exit(1) | |
| }) | |