This commit is contained in:
2026-03-03 15:23:00 +00:00
parent 5e3726de39
commit 8e223bfbec
3689 changed files with 955330 additions and 1011 deletions

30
node_modules/@hapi/hoek/lib/assert.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
'use strict';
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);
};