diff options
Diffstat (limited to 'ext/node/polyfills/internal_binding/_utils.ts')
-rw-r--r-- | ext/node/polyfills/internal_binding/_utils.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/ext/node/polyfills/internal_binding/_utils.ts b/ext/node/polyfills/internal_binding/_utils.ts index 0b1e1709d..74dc3cbcd 100644 --- a/ext/node/polyfills/internal_binding/_utils.ts +++ b/ext/node/polyfills/internal_binding/_utils.ts @@ -7,7 +7,6 @@ import { forgivingBase64Decode, forgivingBase64UrlDecode, } from "ext:deno_web/00_infra.js"; -import { op_base64_write } from "ext:core/ops"; export function asciiToBytes(str: string) { const length = str.length; @@ -28,22 +27,6 @@ export function base64ToBytes(str: string) { } } -export function base64Write( - str: string, - buffer: Uint8Array, - offset: number = 0, - length?: number, -): number { - length = length ?? buffer.byteLength - offset; - try { - return op_base64_write(str, buffer, offset, length); - } catch { - str = base64clean(str); - str = str.replaceAll("-", "+").replaceAll("_", "/"); - return op_base64_write(str, buffer, offset, length); - } -} - const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; function base64clean(str: string) { // Node takes equal signs as end of the Base64 encoding |