MCPcopy Index your code
hub / github.com/denoland/std / assert

Function assert

assert/assert.ts:20–24  ·  view source on GitHub ↗
(expr: unknown, msg = "")

Source from the content-addressed store, hash-verified

18 * @throws {AssertionError} If `expr` is falsy.
19 */
20export function assert(expr: unknown, msg = ""): asserts expr {
21 if (!expr) {
22 throw new AssertionError(msg);
23 }
24}

Callers 15

memoize_test.tsFile · 0.90
lru_cache_test.tsFile · 0.90
equals_test.tsFile · 0.90
copy_test.tsFile · 0.90
ends_with_test.tsFile · 0.90
concat_test.tsFile · 0.90
_pcg32_test.tsFile · 0.90
between_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected