MCPcopy Create free account
hub / github.com/CashScript/cashscript / ensure

Function ensure

packages/cashc/src/cashc-cli.ts:108–110  ·  view source on GitHub ↗
(condition: boolean, msg: string, code?: number)

Source from the content-addressed store, hash-verified

106}
107
108function ensure(condition: boolean, msg: string, code?: number): void {
109 condition || abort(msg, code);
110}
111
112function abort(msg: string, code: number = 1): void {
113 console.error(msg);

Callers 1

runFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected