Skip to content

Commit

Permalink
Remove encode-utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
tenjaa committed Sep 29, 2022
1 parent dc20f97 commit b9c260d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/core/byte-data.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"dependencies": {
"dijkstrajs": "^1.0.1",
"encode-utf8": "^1.0.3",
"pngjs": "^5.0.0",
"yargs": "^15.3.1"
},
Expand Down

0 comments on commit b9c260d

Please sign in to comment.