@deck.gl/core
Version:
deck.gl core library
13 lines (11 loc) • 425 B
text/typescript
// deck.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// 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 default function assert(condition: any, message?: string): asserts condition {
if (!condition) {
throw new Error(message || 'deck.gl: assertion failed.');
}
}