
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@hdml/hooks
Advanced tools
This module is part of the **HDML-Utilities** monorepo and provides a set of I/O utility functions for reading from stdin and writing to stdout. It's designed to work in environments like WebAssembly (Javy) where standard I/O operations require special ha
This module is part of the HDML-Utilities monorepo and provides a set of I/O utility functions for reading from stdin and writing to stdout. It's designed to work in environments like WebAssembly (Javy) where standard I/O operations require special handling.
This package provides the following I/O utility functions:
Uint8Array.Uint8Array to stdout and returns the number of bytes written.This module depends on:
@hdml/parser: For parsing HDML documents@hdml/schemas: FlatBuffers schema-based classes for serialization@hdml/types: TypeScript interface definitions for HDML componentsTo install this module, simply add it to your project:
npm install @hdml/hooks
import { readString, readJson, readUint8Array } from "@hdml/hooks";
// Read a string from stdin
const text = readString();
console.log(text);
// Read and parse JSON from stdin
const data = readJson<{ name: string; age: number }>();
console.log(data.name, data.age);
// Read raw bytes from stdin
const bytes = readUint8Array();
console.log(bytes.length);
import { writeString, writeJson, writeUint8Array } from "@hdml/hooks";
// Write a string to stdout
const bytesWritten = writeString("Hello, world!");
console.log(`Wrote ${bytesWritten} bytes`);
// Write a JSON object to stdout
const bytesWritten = writeJson({ name: "John", age: 30 });
console.log(`Wrote ${bytesWritten} bytes`);
// Write raw bytes to stdout
const bytesWritten = writeUint8Array(new Uint8Array([1, 2, 3]));
console.log(`Wrote ${bytesWritten} bytes`);
import { readJson, writeJson } from "@hdml/hooks";
// Read JSON input from stdin
const input = readJson<{ message: string }>();
// Process the data
const output = {
response: `Received: ${input.message}`,
timestamp: Date.now(),
};
// Write JSON output to stdout
writeJson(output);
Javy.IO.readSync and Javy.IO.writeSync internally, making them suitable for WebAssembly environments like Javy.readUint8Array reads input in 1024-byte chunks and assembles them into a single array.JSON.parse and JSON.stringify for parsing and serialization.Apache License Version 2.0
FAQs
This module is part of the **HDML-Utilities** monorepo and provides a set of I/O utility functions for reading from stdin and writing to stdout. It's designed to work in environments like WebAssembly (Javy) where standard I/O operations require special ha
We found that @hdml/hooks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.