Download backend/node_modules/@hapi/hoek/lib/error.js from chainr-ai/CHAINR: direct link, hf CLI and curl.
- Browser
- Download file 595 Bytes
-
https://huggingface.co/chainr-ai/CHAINR/resolve/main/backend/node_modules/%40hapi/hoek/lib/error.js
- Command line
-
hf download hf://chainr-ai/CHAINR/backend/node_modules/@hapi/hoek/lib/error.js
-
curl -L -o error.js https://huggingface.co/chainr-ai/CHAINR/resolve/main/backend/node_modules/%40hapi/hoek/lib/error.js
595 Bytes
| ; | |
| const Stringify = require('./stringify'); | |
| const internals = {}; | |
| module.exports = class extends Error { | |
| constructor(args) { | |
| const msgs = args | |
| .filter((arg) => arg !== '') | |
| .map((arg) => { | |
| return typeof arg === 'string' ? arg : arg instanceof Error ? arg.message : Stringify(arg); | |
| }); | |
| super(msgs.join(' ') || 'Unknown error'); | |
| if (typeof Error.captureStackTrace === 'function') { // $lab:coverage:ignore$ | |
| Error.captureStackTrace(this, exports.assert); | |
| } | |
| } | |
| }; | |