From a893a38e61bc23124eaf49399d43fd665387b1c1 Mon Sep 17 00:00:00 2001 From: Vivek Date: Wed, 8 Oct 2025 15:53:29 +0530 Subject: [PATCH] Replaced deprecated util.isArray with Array.isArray --- lib/flash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flash.js b/lib/flash.js index a278bc1..a16a866 100644 --- a/lib/flash.js +++ b/lib/flash.js @@ -2,7 +2,7 @@ * Module dependencies. */ var format = require('util').format; -var isArray = require('util').isArray; + /** @@ -64,7 +64,7 @@ function _flash(type, msg) { if (arguments.length > 2 && format) { var args = Array.prototype.slice.call(arguments, 1); msg = format.apply(undefined, args); - } else if (isArray(msg)) { + } else if (Array.isArray(msg)) { msg.forEach(function(val){ (msgs[type] = msgs[type] || []).push(val); });