MCPcopy Create free account
hub / github.com/Ice-Hazymoon/MikuTools / assert

Function assert

utils/core-values-encoder.js:1–10  ·  view source on GitHub ↗
(...express)

Source from the content-addressed store, hash-verified

1function assert(...express) {
2 const l = express.length;
3 const msg =
4 typeof express[l - 1] === 'string' ? express[l - 1] : 'Assert Error';
5 for (let b of express) {
6 if (!b) {
7 throw new Error(msg);
8 }
9 }
10}
11
12function randBin() {
13 return Math.random() >= 0.5;

Callers 4

utf82strFunction · 0.85
hex2duoFunction · 0.85
duo2hexFunction · 0.85
valuesDecodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected