hash-brown-router
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -35,3 +35,4 @@ var pathToRegexp = require('path-to-regexp-with-reversible-keys') | ||
replace: hashLocation.replace, | ||
go: hashLocation.go | ||
go: hashLocation.go, | ||
location: hashLocation | ||
} | ||
@@ -38,0 +39,0 @@ } |
{ | ||
"name": "hash-brown-router", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "A client-side router that only cares about the bits after the #", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,6 +49,6 @@ # hash-brown-router | ||
## `router.go(newPath)` - navigate to a new path | ||
## `router.location.go(newPath)` - navigate to a new path | ||
```js | ||
router.go('/some-other/path') | ||
router.location.go('/some-other/path') | ||
``` | ||
@@ -58,3 +58,3 @@ | ||
## `router.replace(newPath)` - replace the current route in the browser history | ||
## `router.location.replace(newPath)` - replace the current route in the browser history | ||
@@ -64,3 +64,3 @@ ```js | ||
if (doesNotExistInTheDatabase(parameters.pageName)) { | ||
router.replace('/pageNotFound') | ||
router.location.replace('/pageNotFound') | ||
} | ||
@@ -72,2 +72,8 @@ }) | ||
## `router.location.get()` - get the current path, without a leading hash | ||
```js | ||
router.location.get() // => '/page/home' | ||
``` | ||
## `router.evaluateCurrent(defaultPath)` - evaluate the current url | ||
@@ -74,0 +80,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
515172
7408
98
0