UNPKG

core-mvc

Version:

Simple but powerful MVC framework for NodeJS.

15 lines (13 loc) 294 B
export function assert<T>( condition: T, msg: string | { toString(): string } | Error ): asserts condition { if (!condition) { if (typeof msg === 'string') { throw new Error(msg); } else { throw msg; } } } export default assert;