From cc65077eafab9a222fe316a327d719d3a17637e4 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Wed, 22 May 2024 13:19:03 +0200 Subject: [PATCH] fix: replace deprecated function `isArray` https://nodejs.org/docs/latest-v18.x/api/util.html#utilisarrayobject --- lib/result.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/result.js b/lib/result.js index 9eeb050..d48997d 100644 --- a/lib/result.js +++ b/lib/result.js @@ -58,7 +58,7 @@ function logNodeSet(node) { console.log(JSON.stringify(node,' ',4)); return; } - if (util.isArray(node)) { + if (Array.isArray(node)) { if (node.length > 0) { node = node[0]; } @@ -79,7 +79,7 @@ function logNodeList(nodes) { console.log(JSON.stringify(nodes,' ',4)); return; } - if (!util.isArray(nodes)) { + if (!Array.isArray(nodes)) { nodes = [nodes]; } nodes.sort(function(n1,n2) {