c1309eb6e2959384802f03cfee0b363401728e3f982b5bd20cfa0428c5fb4d66754ba59057892a9e05d666f4179a4854e07e594d805d17f2bdb2bd995d41b1-exec 306 B

123456789101112131415161718192021
  1. 'use strict';
  2. const AssertError = require('./error');
  3. const internals = {};
  4. module.exports = function (condition, ...args) {
  5. if (condition) {
  6. return;
  7. }
  8. if (args.length === 1 &&
  9. args[0] instanceof Error) {
  10. throw args[0];
  11. }
  12. throw new AssertError(args);
  13. };