mirror of
https://github.com/denoland/deno.git
synced 2025-01-07 06:46:59 -05:00
ae84e01e8a
For the following example, if I set the encoding to `base64url`, it'll throw an unexpected TypeError: ```ts import { Buffer } from "node:buffer"; Buffer.from("IntcImhlbGxvXCI6XCJoZGQvZStpXCJ9Ig", "base64url").toString(); // error: Uncaught TypeError: src.subarray is not a function // const buf = Buffer.from( // ^ // at blitBuffer (ext:deno_node/internal/buffer.mjs:1779:15) // at Uint8Array.base64urlWrite (ext:deno_node/internal/buffer.mjs:691:10) // at Object.write (ext:deno_node/internal/buffer.mjs:2195:11) // at Uint8Array.write (ext:deno_node/internal/buffer.mjs:794:14) // at fromString (ext:deno_node/internal/buffer.mjs:214:22) // at _from (ext:deno_node/internal/buffer.mjs:119:12) // at Function.from (ext:deno_node/internal/buffer.mjs:157:10) // at file:///Users/foodieats/temp/buffer1.ts:3:20 ``` The error caused by `base64urlWrite` function, it should call `forgivingBase64UrlDecode` not `forgivingBase64UrlEncode` Also fixed #20563 . |
||
---|---|---|
.. | ||
ops | ||
polyfills | ||
analyze.rs | ||
build.rs | ||
Cargo.toml | ||
clippy.toml | ||
errors.rs | ||
global.rs | ||
lib.rs | ||
package_json.rs | ||
path.rs | ||
polyfill.rs | ||
README.md | ||
resolution.rs |
deno_node
require
and other node related functionality for Deno.