From fc717ba2d4c511c16a96a8d0ca32563eed68bf73 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 5 Jan 2022 12:23:59 -0800 Subject: [PATCH] [Refactor] use more explicit `assert.ok` PR-URL: https://github.com/isaacs/node-glob/pull/451 Credit: @ljharb Close: #451 Reviewed-by: @nicolas377 --- sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync.js b/sync.js index f9185494..af4600dd 100644 --- a/sync.js +++ b/sync.js @@ -48,7 +48,7 @@ function GlobSync (pattern, options) { } GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) + assert.ok(this instanceof GlobSync) if (this.realpath) { var self = this this.matches.forEach(function (matchset, index) { @@ -72,7 +72,7 @@ GlobSync.prototype._finish = function () { GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) + assert.ok(this instanceof GlobSync) // Get the first [n] parts of pattern that are all strings. var n = 0