diff --git a/lib/core/qrcode.js b/lib/core/qrcode.js index 1ea40bed..f76df54b 100644 --- a/lib/core/qrcode.js +++ b/lib/core/qrcode.js @@ -11,7 +11,6 @@ const Version = require('./version') const FormatInfo = require('./format-info') const Mode = require('./mode') const Segments = require('./segments') -const isArray = require('isarray') /** * QRCode for JavaScript @@ -379,7 +378,7 @@ function createCodewords (bitBuffer, version, errorCorrectionLevel) { function createSymbol (data, version, errorCorrectionLevel, maskPattern) { let segments - if (isArray(data)) { + if (Array.isArray(data)) { segments = Segments.fromArray(data) } else if (typeof data === 'string') { let estimatedVersion = version diff --git a/lib/core/version.js b/lib/core/version.js index b4e7ee66..32b84661 100755 --- a/lib/core/version.js +++ b/lib/core/version.js @@ -3,7 +3,6 @@ const ECCode = require('./error-correction-code') const ECLevel = require('./error-correction-level') const Mode = require('./mode') const VersionCheck = require('./version-check') -const isArray = require('isarray') // Generator polynomial used to encode version information const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0) @@ -122,7 +121,7 @@ exports.getBestVersionForData = function getBestVersionForData (data, errorCorre const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M) - if (isArray(data)) { + if (Array.isArray(data)) { if (data.length > 1) { return getBestVersionForMixedData(data, ecl) } diff --git a/package-lock.json b/package-lock.json index 07d71e7a..7cbb6965 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2834,11 +2834,6 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", diff --git a/package.json b/package.json index a939f8d1..e633cec4 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "dependencies": { "dijkstrajs": "^1.0.1", "encode-utf8": "^1.0.3", - "isarray": "^2.0.5", "pngjs": "^5.0.0", "uglify-js": "^3.9.1", "yargs": "^15.3.1"