UNPKG

one

Version:

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

16 lines (15 loc) 802 B
function isIndexPath(state) { var _state_index, route = getActualLastRoute(state.routes[(_state_index = state.index) !== null && _state_index !== void 0 ? _state_index : state.routes.length - 1]); return route.state ? isIndexPath(route.state) : route.name === "index" ? !0 : route.params && "screen" in route.params ? route.params.screen === "index" : !!route.name.match(/.+\/index$/); } function getActualLastRoute(routeLike) { var _routeLike_state; if (routeLike.name[0] === "(" && !((_routeLike_state = routeLike.state) === null || _routeLike_state === void 0) && _routeLike_state.routes) { var routes = routeLike.state.routes; return getActualLastRoute(routes[routes.length - 1]); } return routeLike; } export { isIndexPath }; //# sourceMappingURL=isIndexPath.native.js.map