UNPKG

connected-next-router

Version:
24 lines (23 loc) 766 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var locationFromUrl_1 = __importDefault(require("./locationFromUrl")); var createInitialRouterState = function (_a) { var fromJS = _a.fromJS; return function (url) { var initialState = { location: url ? (0, locationFromUrl_1.default)(url) : { pathname: '', search: '', hash: '', href: '', }, }; return fromJS(initialState); }; }; exports.default = createInitialRouterState;