UNPKG

litecanvas

Version:

Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and P5/Processing.

8 lines (7 loc) 177 B
/** * @param {any} condition * @param {string} message */ export const assert = (condition, message = 'Assertion failed') => { if (!condition) throw new Error(message) }