Skip to content

Commit 4e73a2e

Browse files
committed
refactor: Use Array.isArray() instead of instanceof Array
It's faster in newer versions of V8.
1 parent a821775 commit 4e73a2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/MySQLTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ class MySQLTable {
236236
sqlString = '';
237237
}
238238

239-
if (data instanceof Array) {
239+
if (Array.isArray(data)) {
240240
data = data.length > 1
241241
? ' (' + this._db.escapeId(data[0]) + ') VALUES ' + this._db.escape(data[1])
242242
: ' VALUES ' + this._db.escape(data[0]);

0 commit comments

Comments
 (0)