Download node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/slurpFile.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 479 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/shared-ini-file-loader/dist-cjs/slurpFile.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/slurpFile.js
-
curl -L -o slurpFile.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/shared-ini-file-loader/dist-cjs/slurpFile.js
479 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.slurpFile = void 0; | |
| const fs_1 = require("fs"); | |
| const { readFile } = fs_1.promises; | |
| const filePromisesHash = {}; | |
| const slurpFile = (path, options) => { | |
| if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { | |
| filePromisesHash[path] = readFile(path, "utf8"); | |
| } | |
| return filePromisesHash[path]; | |
| }; | |
| exports.slurpFile = slurpFile; | |