MCPcopy Index your code
hub / github.com/tensorflow/tfjs / assert

Function assert

tfjs-layers/src/utils/generic_utils.ts:39–43  ·  view source on GitHub ↗
(val: boolean, message?: string)

Source from the content-addressed store, hash-verified

37}
38
39export function assert(val: boolean, message?: string): void {
40 if (!val) {
41 throw new AssertionError(message);
42 }
43}
44
45/**
46 * Count the number of elements of the `array` that are equal to `reference`.

Callers 2

checkArrayTypeAndLengthFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…