UNPKG

@turbox3d/shared

Version:

turbox shared internal utility

12 lines 452 B
export var OBFUSCATED_ERROR = 'An invariant failed, however the error is obfuscated because this is an production build.'; export function invariant(check, message) { if (!check) throw new Error("[turbox]: ".concat(message || OBFUSCATED_ERROR)); } export function fail(message) { invariant(false, message); // eslint-disable-next-line no-throw-literal throw 'X'; } export function warn(message) { console.warn("[turbox]: ".concat(message)); }