react-router-config.min.js 1.2 KB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react-router"),require("react")):"function"==typeof define&&define.amd?define(["exports","react-router","react"],t):t((e=e||self).ReactRouterConfig={},e.ReactRouter,e.React)}(this,function(e,u,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}n=n&&n.hasOwnProperty("default")?n.default:n,e.matchRoutes=function r(e,n,o){return void 0===o&&(o=[]),e.some(function(e){var t=e.path?u.matchPath(n,e):o.length?o[o.length-1].match:u.Router.computeRootMatch(n);return t&&(o.push({route:e,match:t}),e.routes&&r(e.routes,n,o)),t}),o},e.renderRoutes=function(e,r,t){return void 0===r&&(r={}),void 0===t&&(t={}),e?n.createElement(u.Switch,t,e.map(function(t,e){return n.createElement(u.Route,{key:t.key||e,path:t.path,exact:t.exact,strict:t.strict,render:function(e){return t.render?t.render(o({},e,{},r,{route:t})):n.createElement(t.component,o({},e,r,{route:t}))}})})):null},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=react-router-config.min.js.map