Open this example in the interactive library
Source code
import { Buffer, isUtf8, isAscii } from "node:buffer";
console.log([...Buffer.from("ff0a", "hex")]);
Sample output
[ 255, 10 ]

Open this example in the interactive library
import { Buffer, isUtf8, isAscii } from "node:buffer";
console.log([...Buffer.from("ff0a", "hex")]);
[ 255, 10 ]