Merge pull request #317 from tenjaa/remove-encode-utf8
Remove encode-utf8
This commit is contained in:
commit
e09b913a65
3 changed files with 3 additions and 9 deletions
|
@ -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
5
package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"dijkstrajs": "^1.0.1",
|
||||
"encode-utf8": "^1.0.3",
|
||||
"pngjs": "^5.0.0",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue