• File: index.js
  • Full Path: /var/www/nodejs/callDir/node_modules/minimalistic-assert/index.js
  • Date Modified: 06/03/2024 5:11 PM
  • File size: 252 bytes
  • MIME-type: text/plain
  • Charset: utf-8
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));
};