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.0 to 1.4.1

browser-test.js

7

hash-location.js

@@ -22,5 +22,10 @@ var EventEmitter = require('events').EventEmitter

function replace(window, newPath) {
window.location.replace(window.location.origin + window.location.pathname + '#' + newPath)
window.location.replace(everythingBeforeTheSlash(window.location.href) + '#' + newPath)
}
function everythingBeforeTheSlash(url) {
var hashIndex = url.indexOf('#')
return hashIndex === -1 ? url : url.substring(0, hashIndex)
}
function go(window, newPath) {

@@ -27,0 +32,0 @@ window.location.hash = newPath

6

package.json
{
"name": "hash-brown-router",
"version": "1.4.0",
"version": "1.4.1",
"description": "A client-side router that only cares about the bits after the #",

@@ -8,3 +8,4 @@ "main": "index.js",

"test": "node test/automated-test.js",
"browserwatch": "watchify test/browser-test.js -o test/build.js -d"
"browserwatch": "watchify test/browser-test.js -o test/build.js -d",
"browsertest": "browserify test/browser-test.js -o browser-test.js -d"
},

@@ -29,2 +30,3 @@ "repository": {

"devDependencies": {
"browserify": "^11.0.0",
"domready": "^1.0.8",

@@ -31,0 +33,0 @@ "tap-browser-color": "^0.1.2",

@@ -11,3 +11,3 @@ var router = require('../')

var route = getRoute()
t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -32,3 +32,3 @@ route.add('/non-butts', function() {

route.stop()
}, 200)
}, 500)
})

@@ -39,3 +39,3 @@

t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -58,3 +58,3 @@ var fail = t.fail.bind(t, 'the wrong route was called')

route.stop()
}, 200)
}, 500)
})

@@ -88,3 +88,3 @@

t.end()
}, 200)
}, 500)
})

@@ -95,3 +95,3 @@

t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -112,3 +112,3 @@ route.add('/no/way', t.fail.bind(t, 'the wrong route was called'))

route.stop()
}, 200)
}, 500)
})

@@ -119,3 +119,3 @@

t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -135,3 +135,3 @@ route.add('/default', function() {

route.stop()
}, 200)
}, 500)
})

@@ -142,3 +142,3 @@

t.timeoutAfter(400)
t.timeoutAfter(2000)

@@ -159,3 +159,3 @@ locationHash.go('/starting-path')

route.stop()
}, 200)
}, 500)

@@ -168,3 +168,3 @@ }, 100)

var route = getRoute()
t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -185,3 +185,3 @@ route.add('myroute/:fromUrl', function(parameters) {

route.stop()
}, 200)
}, 500)
})

@@ -192,3 +192,3 @@

t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -207,3 +207,3 @@ route.add('myroute/:fromUrl', function(parameters) {

route.stop()
}, 200)
}, 500)
})

@@ -214,3 +214,3 @@

t.timeoutAfter(300)
t.timeoutAfter(2000)

@@ -230,3 +230,3 @@ route.setDefault(function(path, parameters) {

route.stop()
}, 200)
}, 500)
})

@@ -274,3 +274,3 @@

t.timeoutAfter(500)
t.timeoutAfter(2000)

@@ -296,3 +296,3 @@ route.add('/route/:oneThing', function() {

t.timeoutAfter(500)
t.timeoutAfter(2000)

@@ -299,0 +299,0 @@ route.add('/route/:oneThing', function() {

var allTests = require('./all-tests')
var tapBrowserColor = require('tap-browser-color')
// var tapBrowserColor = require('tap-browser-color')
var browserHashLocation = require('../hash-location.js')

@@ -9,2 +9,2 @@

tapBrowserColor()
// tapBrowserColor()

Sorry, the diff of this file is not supported yet

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