import * as orig_assert from "assert" ; import { isWebpack } from "../common" ; export const breakOnAssert = /^(true|1)$/i . test ( process . env . BREAK_ON_ASSERT ?? '' ) ; function fixed_ok ( value , message ? ) { if ( ! ! value ) { return ; } if ( breakOnAssert ) { debugger ; } if ( isWebpack ) { orig_assert . ok ( value , message || "Assertion failed" ) ; } orig_assert . ok ( value , message ) ; } const fixed_assert = < typeof orig_assert > fixed_ok ; Object . assign ( fixed_assert , orig_assert ) ; export const assert = fixed_assert ;