Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hash-brown-router

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-brown-router - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0

3

index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc