unenv
unenv copied to clipboard
implement base64url in Buffer
Environment
latest node and unenv
Reproduction
Buffer.from('hello').toString('base64url')
Describe the bug
base64url is not implemented
Additional context
base64url is just base64.replaceAll("+", "-").replaceAll("/", "_").replace("==", "")
there's https://github.com/feross/buffer/pull/314 but the author is not proving it
Logs
you can also use deno's browser-compatible polyfills for node.js builtins: https://deno.land/[email protected]/node/internal/buffer.mjs?source
Do you mind to drop a PR?
Deno implementation is good, you can use this also I converted it to b64url only + small changes.