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 7dd6405
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/process/task_queues.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ const {
const FixedQueue = require('internal/fixed_queue');

const {
validateCallback,
validateFunction,
validateCallback
} = 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 7dd6405

Please sign in to comment.