UNPKG

@loaders.gl/loader-utils

Version:

Framework-independent loaders for 3D graphics formats

10 lines (9 loc) 294 B
/** * Throws an `Error` with the optional `message` if `condition` is falsy * @note Replacement for the external assert method to reduce bundle size */ export function assert(condition, message) { if (!condition) { throw new Error(message || 'loader assertion failed.'); } }