👁 查看:index.js
路径:/home/boguraj1/public_html/jobsite/node_modules/minimalistic-assert/index.js
大小:252 B · 修改:2022-11-21 20:10:20 · 权限:0644 · 可写
module.exports = assert;

function assert(val, msg) {
  if (!val)
    throw new Error(msg || 'Assertion failed');
}

assert.equal = function assertEqual(l, r, msg) {
  if (l != r)
    throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
};