Files
react-navigation/packages/core/package.json
satyajit.happy 849d952703 feat: make deep link handling more flexible
This adds ability to specify a custom config to control how to convert between state and path.

Example:

```js
{
  Chat: {
    path: 'chat/:author/:id',
    parse: { id: Number }
  }
}
```

The above config can parse a path matching the provided pattern: `chat/jane/42` to a valid state:

```js
{
  routes: [
    {
      name: 'Chat',
      params: { author: 'jane', id: 42 },
    },
  ],
}
```

This makes it much easier to control the parsing without having to specify a custom function.
2019-09-16 13:20:19 +02:00

61 lines
1.3 KiB
JSON

{
"name": "@react-navigation/core",
"description": "Core utilities for building navigators",
"keywords": [
"react",
"react-native",
"react-navigation"
],
"version": "5.0.0-alpha.8",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/react-navigation/navigation-ex.git",
"directory": "packages/core"
},
"main": "lib/commonjs/index.js",
"react-native": "src/index.tsx",
"module": "lib/module/index.js",
"types": "lib/typescript/index.d.ts",
"files": [
"src",
"lib"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"prepare": "bob build",
"clean": "del lib"
},
"dependencies": {
"escape-string-regexp": "^2.0.0",
"query-string": "^6.8.3",
"shortid": "^2.2.14",
"use-subscription": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@react-native-community/bob": "^0.7.0",
"@types/react": "^16.8.19",
"@types/shortid": "^0.0.29",
"del-cli": "^2.0.0",
"react": "^16.8.3",
"react-native-testing-library": "^1.9.1",
"react-test-renderer": "16.8.3",
"typescript": "^3.5.3"
},
"peerDependencies": {
"react": "^16.8.3"
},
"@react-native-community/bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
"typescript"
]
}
}