Remove encode-utf8

This commit is contained in:
Torben Neufeldt 2022-09-29 09:42:14 +02:00 committed by Torben Neufeldt
parent dc20f975a5
commit b9c260d8a3
3 changed files with 3 additions and 9 deletions

View file

@ -1,12 +1,12 @@
const encodeUtf8 = require('encode-utf8')
const Mode = require('./mode')
function ByteData (data) {
this.mode = Mode.BYTE
if (typeof (data) === 'string') {
data = encodeUtf8(data)
this.data = new TextEncoder().encode(data)
} else {
this.data = new Uint8Array(data)
}
this.data = new Uint8Array(data)
}
ByteData.getBitsLength = function getBitsLength (length) {

5
package-lock.json generated
View file

@ -2529,11 +2529,6 @@
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"encode-utf8": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz",
"integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",

View file

@ -39,7 +39,6 @@
},
"dependencies": {
"dijkstrajs": "^1.0.1",
"encode-utf8": "^1.0.3",
"pngjs": "^5.0.0",
"yargs": "^15.3.1"
},