Skip to content

Commit ff85d22

Browse files
authored
Replace use of deprecated util.isArray
Array.isArray() is part of ES5 and has been in Node since at least Node 4, probably earlier even. This package requires Node 16+. As of Node.js 22.0.0, util.isArray has a runtime deprecation warning. Fixes #286.
1 parent a241e61 commit ff85d22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tasks/connect.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = function(grunt) {
2121
var open = require('open');
2222
var portscanner = require('portscanner');
2323
var async = require('async');
24-
var util = require('util');
2524

2625
var MAX_PORTS = 30; // Maximum available ports to check after the specified port
2726

@@ -161,7 +160,7 @@ module.exports = function(grunt) {
161160
};
162161

163162
middleware.forEach(function (m) {
164-
if (!util.isArray(m)) {
163+
if (!Array.isArray(m)) {
165164
m = [m];
166165
}
167166
app.use.apply(app, m);

0 commit comments

Comments
 (0)