summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/base64URLStringToBuffer.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-18 13:59:11 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-18 13:59:11 -0700
commita59634a1a9b0393622fb121fbe229132c01a2624 (patch)
treecb4eb3fdf778dfc88d6d389b609b1cef6ebb4b4d /packages/browser/src/helpers/base64URLStringToBuffer.ts
parente0d32bd2a3a60b4b2fd96a2874eae3ad976483df (diff)
Use single-quotes and increase line width
Diffstat (limited to 'packages/browser/src/helpers/base64URLStringToBuffer.ts')
-rw-r--r--packages/browser/src/helpers/base64URLStringToBuffer.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/browser/src/helpers/base64URLStringToBuffer.ts b/packages/browser/src/helpers/base64URLStringToBuffer.ts
index db78b35..f30b3d5 100644
--- a/packages/browser/src/helpers/base64URLStringToBuffer.ts
+++ b/packages/browser/src/helpers/base64URLStringToBuffer.ts
@@ -7,7 +7,7 @@
*/
export function base64URLStringToBuffer(base64URLString: string): ArrayBuffer {
// Convert from Base64URL to Base64
- const base64 = base64URLString.replace(/-/g, "+").replace(/_/g, "/");
+ const base64 = base64URLString.replace(/-/g, '+').replace(/_/g, '/');
/**
* Pad with '=' until it's a multiple of four
* (4 - (85 % 4 = 1) = 3) % 4 = 3 padding
@@ -16,7 +16,7 @@ export function base64URLStringToBuffer(base64URLString: string): ArrayBuffer {
* (4 - (88 % 4 = 0) = 4) % 4 = 0 padding
*/
const padLength = (4 - (base64.length % 4)) % 4;
- const padded = base64.padEnd(base64.length + padLength, "=");
+ const padded = base64.padEnd(base64.length + padLength, '=');
// Convert to a binary string
const binary = atob(padded);