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 3.0.1 to 3.0.2

2

hash-location-mock.js

@@ -1,2 +0,2 @@

var EventEmitter = require('events').EventEmitter
var EventEmitter = require('events')

@@ -3,0 +3,0 @@ module.exports = function HashLocationMock() {

@@ -1,2 +0,2 @@

var EventEmitter = require('events').EventEmitter
var EventEmitter = require('events')

@@ -3,0 +3,0 @@ module.exports = function HashLocation(window) {

@@ -5,3 +5,3 @@ var pathToRegexp = require('path-to-regexp-with-reversible-keys')

var browserHashLocation = require('./hash-location.js')
var EventEmitter = require('events').EventEmitter
var EventEmitter = require('events')
require('array.prototype.find')

@@ -8,0 +8,0 @@

{
"name": "hash-brown-router",
"version": "3.0.1",
"version": "3.0.2",
"description": "A client-side router that only cares about the bits after the #",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,2 +5,4 @@ # hash-brown-router

Want to use this router, but with `go` translated to `pushState`? Use this library with [`sausage-router`](https://github.com/TehShrike/sausage-router/)!
## Why another client-side routing library?

@@ -43,3 +45,3 @@

var router = makeRouter(options)
var router = makeRouter(options, [location object])
```

@@ -49,2 +51,3 @@

- `reverse`: By default, routes are matched from oldest to newest. So if there are multiple matching routes for the current url, the first one that was added is used. If `reverse` is set to `true`, then the most recently added match is used.
- `location`, an abstraction of the browser's location matching [this interface](https://github.com/TehShrike/hash-brown-router/blob/master/hash-location-mock.js#L3-L23)

@@ -51,0 +54,0 @@ The router is an event emitter that emits:

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