MCPcopy
hub / github.com/pezzolabs/pezzo / invariant

Function invariant

tools/scripts/publish.mjs:15–20  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

13import chalk from "chalk";
14
15function invariant(condition, message) {
16 if (!condition) {
17 console.error(chalk.bold.red(message));
18 process.exit(1);
19 }
20}
21
22// Executing publish script: node path/to/publish.mjs {name} --version {version} --tag {tag}
23// Default "tag" to "next" so we won't publish the "latest" tag by accident.

Callers 1

publish.mjsFile · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected