nedb
nedb copied to clipboard
DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
nedb/lib/indexes.js:69:12
if (util.isArray(doc)) { this.insertMultipleDocs(doc); return; }
recommended to be
if (Array.isArray(doc)) { this.insertMultipleDocs(doc); return; }
That is not the only place you need to replace a util function. At many places in datastore.js, indexes.js and model.js you will need to replace the deprecated functions. Do the following replacements: util.isArray(x) with Array.isArray(x) util.isDate(x) with x instanceof Date util.isRegExp(x) with x instanceof RegExp