@react-navigation/core
Advanced tools
Comparing version 3.0.0-alpha.2 to 3.0.0-alpha.3
import React from 'react'; | ||
import { polyfill } from 'react-lifecycles-compat'; | ||
import invariant from '../utils/invariant'; | ||
@@ -17,2 +18,3 @@ function createNavigator(NavigatorView, router, navigationConfig) { | ||
const { navigation, screenProps } = nextProps; | ||
invariant(navigation != null, 'Navigation containers!'); | ||
const { state } = navigation; | ||
@@ -19,0 +21,0 @@ const { routes } = state; |
@@ -44,3 +44,4 @@ import pathToRegexp, { compile } from 'path-to-regexp'; | ||
}; | ||
export const urlToPathAndParams = (url, uriPrefix) => { | ||
const urlToPathAndParams = (url, uriPrefix) => { | ||
const searchMatch = url.match(/^(.*)\?(.*)$/); | ||
@@ -66,3 +67,3 @@ const params = searchMatch ? queryString.parse(searchMatch[2]) : {}; | ||
export const createPathParser = (childRouters, routeConfigs, { paths: pathConfigs = {}, disableRouteNamePaths }) => { | ||
const createPathParser = (childRouters, routeConfigs, { paths: pathConfigs = {}, disableRouteNamePaths }) => { | ||
const pathsByRouteNames = {}; | ||
@@ -194,3 +195,4 @@ let paths = []; | ||
getParamsFromPath, | ||
createPathParser | ||
createPathParser, | ||
urlToPathAndParams | ||
}; |
{ | ||
"name": "@react-navigation/core", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0-alpha.3", | ||
"description": "Core utilities for the react-navigation framework", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import React from 'react'; | ||
import { polyfill } from 'react-lifecycles-compat'; | ||
import invariant from '../utils/invariant'; | ||
@@ -17,2 +18,3 @@ function createNavigator(NavigatorView, router, navigationConfig) { | ||
const { navigation, screenProps } = nextProps; | ||
invariant(navigation != null, 'Navigation containers!'); | ||
const { state } = navigation; | ||
@@ -19,0 +21,0 @@ const { routes } = state; |
@@ -46,3 +46,4 @@ import pathToRegexp, { compile } from 'path-to-regexp'; | ||
}; | ||
export const urlToPathAndParams = (url, uriPrefix) => { | ||
const urlToPathAndParams = (url, uriPrefix) => { | ||
const searchMatch = url.match(/^(.*)\?(.*)$/); | ||
@@ -68,3 +69,3 @@ const params = searchMatch ? queryString.parse(searchMatch[2]) : {}; | ||
export const createPathParser = ( | ||
const createPathParser = ( | ||
childRouters, | ||
@@ -225,2 +226,3 @@ routeConfigs, | ||
createPathParser, | ||
urlToPathAndParams, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
317302
9469