@virtualstate/app-history
Version:
Native JavaScript [app-history](https://github.com/WICG/app-history) implementation
18 lines • 493 B
JavaScript
/* c8 ignore start */
import { getConfig } from "./config.js";
export function ok(value) {
assert(value);
}
export function assert(value, message) {
if (!value)
throw new Error(message);
}
export function debug(...messages) {
if (getConfig().FLAGS?.includes("DEBUG")) {
console.log(...messages);
}
}
export function isWindowAppHistory(appHistory) {
return typeof window !== "undefined" && window.appHistory === appHistory;
}
//# sourceMappingURL=util.js.map