UNPKG

@orbit/core

Version:

Core library for Orbit - a flexible data access and synchronization layer.

11 lines (9 loc) 231 B
import { Assertion } from './exception'; /** * Throw an exception if `test` is not truthy. */ export function assert(description: string, test: boolean): void | never { if (!test) { throw new Assertion(description); } }