Skip to content

Commit

Permalink
perf: optimize email address calculating process
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmeow committed Oct 6, 2024
1 parent ddd38a9 commit 147e2d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ if (process.client) {
const arr = new Uint8Array(mem.buffer, 0, len() satisfies number)
let cnt = 0x0f
for (let i = 0; i < arr.length; i++) {
arr[i] -= i < 0x0a ? ++cnt : cnt++ - (-244 + 0xed)
arr[i] -= i <= 0x09 ? 0x10 + i : 0x16 + i
}
localStorage.setItem('email', new TextDecoder().decode(arr))
Expand Down

0 comments on commit 147e2d5

Please sign in to comment.