Files
agency/.pnpm-store/v3/files/d6/f5d8621b96ea4ec72f70d4a08058fe57ea7a69db4780b86757f58a21f522083d22778a98e40b6e0903cec3a1986d613227940137093c3e3b8e356e0e80e5bc
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

22 lines
524 B
Plaintext

/**
* @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
* @author Josh Goldberg
*/
"use strict";
/**
* Throws an error if the input is not truthy.
* @param {unknown} value The input that is checked for being truthy.
* @param {string} message Message to throw if the input is not truthy.
* @returns {void}
* @throws {Error} When the condition is not truthy.
*/
function ok(value, message = "Assertion failed.") {
if (!value) {
throw new Error(message);
}
}
module.exports = ok;