Skip to content

Commit

Permalink
Merge pull request #317 from tenjaa/remove-encode-utf8
Browse files Browse the repository at this point in the history
Remove encode-utf8
  • Loading branch information
soldair authored May 6, 2024
2 parents ec2d8d0 + b9c260d commit e09b913
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 e09b913

Please sign in to comment.