/* c8 ignore start */
export function assert(value, message = "Assertion failed") {
    if (value === false || value === null || value === undefined) {
        const error = new Error(trimLines(message));
        error.stack = removeLine(error.stack, "assert.ts");
        throw error;
    }
}
const trimLines = (s) => s
    .split("\n")
    .map(s => s.trim())
    .join("\n");
const removeLine = (s = "", targetText) => s
    .split("\n")
    .filter(line => !line.includes(targetText))
    .join("\n");
/* c8 ignore end */
