@kitbag/router 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,8 +3,7 @@
3
3
  A simple and versatile mapping utility for Typescript.
4
4
 
5
5
  [![Npm Version](https://img.shields.io/npm/v/@kitbag/router.svg)](https://www.npmjs.org/package/kitbag/router)
6
- [![Zip Size](https://img.badgesize.io/https:/unpkg.com/@kitbag/router/dist/kitbag-router?compression=gzip)](https:/unpkg.com/@kitbag/router/dist/kitbag-router)
7
- [![Netlify Status](https://api.netlify.com/api/v1/badges/d6033c76-88c3-4963-b24f-7a0bda20f271/deploy-status)](https://app.netlify.com/sites/kitbag-router/deploys)
6
+ [![Netlify Status](https://api.netlify.com/api/v1/badges/c12f79b8-49f9-4529-bc23-f8ffca8919a3/deploy-status)](https://app.netlify.com/sites/kitbag-router/deploys)
8
7
 
9
8
  Get started with the [documentation](https://kitbag-router.netlify.app/)
10
9
 
@@ -108,6 +107,23 @@ router.push('https://github.com/kitbagjs/router')
108
107
 
109
108
  This `source` argument is type safe, expecting either a Url or a valid route "key". Url is any string that starts with "http", "https", or a forward slash "/". Route key is a string of route names joined by a period `.` that lead to a non-disabled route. Additionally if using the route key, push will require params be passed in if there are any.
110
109
 
110
+ ## Update
111
+
112
+ If you only wish to change the params on the current route you can use `router.route.update`.
113
+
114
+ ```ts
115
+ router.route.update('myParam': 123)
116
+ ```
117
+
118
+ or for setting multiple params at once
119
+
120
+ ```ts
121
+ router.route.update({
122
+ myParam: 123,
123
+ tab: 'github',
124
+ })
125
+ ```
126
+
111
127
  ## RouterView
112
128
 
113
129
  Give your route components a place to be mounted