Skip to content

Commit

Permalink
feat: Remove node assert usage
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Aug 25, 2022
1 parent 2c47259 commit a1ba61d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

var assert = require('assert');

function noop() {}

function getExtensions(lastArg) {
Expand Down Expand Up @@ -58,7 +56,9 @@ function buildOnSettled(done) {
function verifyArguments(args) {
args = Array.prototype.slice.apply(args);

assert.ok(args.length, 'A set of functions to combine is required');
if (!args.length) {
throw new Error('A set of functions to combine is required');
}

args.forEach(verifyEachArg);

Expand All @@ -81,7 +81,7 @@ function verifyEachArg(arg, argIdx, args) {
typeof arg +
' for argument ' +
argIdx;
assert.ok(isFunction, msg);
throw new Error(msg);
}

module.exports = {
Expand Down

0 comments on commit a1ba61d

Please sign in to comment.