Spaces:
Paused
Paused
Download backend/node_modules/@hapi/hoek/lib/assert.js from AUXteam/UX-agent: direct link, hf CLI and curl.
- Browser
- Download file 589 Bytes
-
https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/backend/node_modules/%40hapi/hoek/lib/assert.js
- Command line
-
hf download hf://spaces/AUXteam/UX-agent/backend/node_modules/@hapi/hoek/lib/assert.js
-
curl -L -o assert.js https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/backend/node_modules/%40hapi/hoek/lib/assert.js
589 Bytes
| ; | |
| const AssertError = require('./assertError'); | |
| const Stringify = require('./stringify'); | |
| const internals = {}; | |
| const assert = module.exports = function (condition, ...args) { | |
| if (condition) { | |
| return; | |
| } | |
| if (args.length === 1 && | |
| args[0] instanceof Error) { | |
| throw args[0]; | |
| } | |
| const msgs = args | |
| .filter((arg) => arg !== '') | |
| .map((arg) => { | |
| return typeof arg === 'string' ? arg : arg instanceof Error ? arg.message : Stringify(arg); | |
| }); | |
| throw new AssertError(msgs.join(' '), assert); | |
| }; | |