From b09e9c378f00301d3d612e508145fee656f6faea Mon Sep 17 00:00:00 2001 From: Adam Stephan-Slade Date: Wed, 23 Oct 2024 20:21:29 +1000 Subject: [PATCH] Use Array.isArray instead of util.isArray in flash.js --- lib/flash.js | 3 +-- package-lock.json | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 package-lock.json diff --git a/lib/flash.js b/lib/flash.js index a278bc1..3870866 100644 --- a/lib/flash.js +++ b/lib/flash.js @@ -2,7 +2,6 @@ * Module dependencies. */ var format = require('util').format; -var isArray = require('util').isArray; /** @@ -64,7 +63,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); }); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..688465f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,49 @@ +{ + "name": "connect-flash", + "version": "0.1.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "connect-flash", + "version": "0.1.1", + "devDependencies": { + "vows": "0.6.x" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/diff": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz", + "integrity": "sha512-1zEb73vemXFpUmfh3fsta4YHz3lwebxXvaWmPbFv9apujQBWDnkrPDLXLQs1gZo4RCWMDsT89r0Pf/z8/02TGA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "dev": true, + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/vows": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/vows/-/vows-0.6.4.tgz", + "integrity": "sha512-CnnxhTuz08RHlAEagUSH6806IMxlOvYK5Nz5CyRGaqk9m2qVsP/0vtNBtU9rUS0TTrx3JYmPtHwIELaf+91t0Q==", + "dev": true, + "dependencies": { + "diff": "~1.0.3", + "eyes": ">=0.1.6" + }, + "bin": { + "vows": "bin/vows" + } + } + } +}