Files
MultiPROG-Ultimate-Kit/17_MultiPROG_SDK/templates/template_binary_tool.mjs
T
2026-09-15 12:00:52 -07:00

29 lines
705 B
JavaScript

/*
* Template: Binary utility tool
* Purpose: parse and transform bytes with synthetic examples.
* Warning: Replace placeholder host APIs with verified Multi-PROG Help API calls.
*/
const SCRIPT_METADATA = {
name: "template_binary_tool",
version: "0.1.0",
purpose: "Binary processing",
author: "Repository contributor",
validation: "Synthetic test data only",
};
function toHex(buffer) {
if (!(buffer instanceof Uint8Array))
throw new TypeError("Uint8Array required");
return Array.from(buffer)
.map((b) => b.toString(16).padStart(2, "0"))
.join(" ");
}
function main() {
const sample = new Uint8Array([0xde, 0xad, 0xbe, 0xef]);
console.log(toHex(sample));
}
main();