UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

28 lines (27 loc) 678 B
import { getPathFromState } from "../fork/getPathFromState"; import { getStateFromPath } from "../fork/getStateFromPath"; function getInitialURL() { return typeof window > "u" ? "" : window.location?.href || ""; } function getRootURL() { return "/"; } function addEventListener(listener) { if (typeof window > "u") return () => { }; const callback = () => { listener(window.location.href); }; return window.addEventListener("popstate", callback), () => { window.removeEventListener("popstate", callback); }; } export { addEventListener, getInitialURL, getPathFromState, getRootURL, getStateFromPath }; //# sourceMappingURL=linking.js.map