Deprecation Warning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
Opened this issue · 1 comments
To the devs of connect-flash,
In my nodejs project, I used connect-flash to display messages like 'Comment created successfully', etc. when I got the following warning:
(node:4588) [DEP0044] DeprecationWarning: The util.isArray
API is deprecated. Please use Array.isArray()
instead.
The stacktrace tells me it originated from connect-flash\lib\flash.js:67:16 when I used node --trace-deprecation
Kindly change it as soon as possible.
Thank you!
@Hari-Shankar-Karthik
I went into node_modules/connect-flash/lib/flash.js
Then I changed the line: var isArray = require('util').isArray;
to: var isArray = Array.isArray;
I know next to nothing in coding, but now the deprecation error went away for me. Not sure if this is the right solution, as I am still new to all this, but again, I don't have an error any longer.