UNPKG

@loaders.gl/schema

Version:

Table format APIs for JSON, CSV, etc...

9 lines (8 loc) 319 B
// Replacement for the external assert method to reduce bundle size // Note: We don't use the second "message" argument in calling code, // so no need to support it here export function assert(condition: boolean, message?: string) { if (!condition) { throw new Error(message || 'loader assertion failed.'); } }