UNPKG

@7sage/vidstack

Version:

UI component library for building high-quality, accessible video and audio experiences on the web.

11 lines (9 loc) 279 B
function coerceToError(error) { return error instanceof Error ? error : Error(typeof error === "string" ? error : JSON.stringify(error)); } function assert(condition, message) { if (!condition) { throw Error("Assertion failed."); } } export { assert, coerceToError };