Skip to content

Commit

Permalink
process: replace validator
Browse files Browse the repository at this point in the history
Replace the `validateFunction()` validator with the
`validateCallback()` validator to validate callbacks and keep
consistency.
  • Loading branch information
VoltrexKeyva committed Jan 23, 2022
1 parent b09d1f4 commit 563e149
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/process/task_queues.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const FixedQueue = require('internal/fixed_queue');

const {
validateCallback,
validateFunction,
} = require('internal/validators');

const { AsyncResource } = require('async_hooks');
Expand Down Expand Up @@ -148,7 +147,7 @@ function runMicrotask() {
const defaultMicrotaskResourceOpts = { requireManualDestroy: true };

function queueMicrotask(callback) {
validateFunction(callback, 'callback');
validateCallback(callback);

const asyncResource = new AsyncResource(
'Microtask',
Expand Down

0 comments on commit 563e149

Please sign in to comment.