Open this example in the interactive library
Source code
import { Buffer, isUtf8, isAscii } from "node:buffer";
console.log(Buffer.from("hello").toString("base64"));
Sample output
aGVsbG8=

Open this example in the interactive library
import { Buffer, isUtf8, isAscii } from "node:buffer";
console.log(Buffer.from("hello").toString("base64"));
aGVsbG8=