MCPcopy Index your code
hub / github.com/samuelmtimbo/unit / assert

Function assert

src/util/assert.ts:3–7  ·  view source on GitHub ↗
(test: boolean, message: string = '')

Source from the content-addressed store, hash-verified

1import isEqual from '../system/f/comparison/Equals/f'
2
3export function assert(test: boolean, message: string = ''): void {
4 if (!test) {
5 throw new Error(message)
6 }
7}
8
9export function equal<T>(a: T, b: T, message: string = ''): void {
10 return assert(a === b, message)

Callers 11

component.tsFile · 0.90
id.tsFile · 0.90
geometry.tsFile · 0.90
util.tsFile · 0.90
object.tsFile · 0.90
Identity.tsFile · 0.85
RandomBit.tsFile · 0.85
compatibility.tsFile · 0.85
parser.tsFile · 0.85
equalFunction · 0.85
deepEqualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected