Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@hapi/hoek/lib/assert.js
2593 views
1
'use strict';
2
3
const AssertError = require('./error');
4
5
const internals = {};
6
7
8
module.exports = function (condition, ...args) {
9
10
if (condition) {
11
return;
12
}
13
14
if (args.length === 1 &&
15
args[0] instanceof Error) {
16
17
throw args[0];
18
}
19
20
throw new AssertError(args);
21
};
22
23