Skip to content

Commit

Permalink
fix: ignoring atob and btoa
Browse files Browse the repository at this point in the history
  • Loading branch information
flauc committed Dec 23, 2023
1 parent 9035f7b commit 091b6ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/base-64-url-decode/base-64-url-decode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export function base64UrlDecode(value: string, parse = true) {
// @ts-ignore
value = atob(
value
.replace(/\-/g, '+')
Expand Down
1 change: 1 addition & 0 deletions src/base-64-url-encode/base-64-url-encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export function base64UrlEncode(value: any, stringify = true) {
value = JSON.stringify(value);
}

// @ts-ignore
return btoa(value)
.replace(/\+/g, '-')
.replace(/\//g, '_')
Expand Down

0 comments on commit 091b6ff

Please sign in to comment.