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

abstract-state-router

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-state-router - npm Package Compare versions

Comparing version 5.14.0 to 5.14.1

4

changelog.md

@@ -0,1 +1,5 @@

# [5.14.1](https://github.com/TehShrike/abstract-state-router/releases/tag/v5.14.1)
- bug fix: empty strings in default parameters would cause the state router to stop cold without any error message [#2abf9361](https://github.com/TehShrike/abstract-state-router/commit/2abf936172271369c07413f47c9917dd9d36c005)
# [5.14.0](https://github.com/TehShrike/abstract-state-router/releases/tag/v5.14.0)

@@ -2,0 +6,0 @@

2

index.js

@@ -229,3 +229,3 @@ var StateState = require('./lib/state-state')

var needToApplyDefaults = Object.keys(defaultParams).some(function missingParameterValue(param) {
return !parameters[param]
return typeof parameters[param] === 'undefined'
})

@@ -232,0 +232,0 @@

{
"name": "abstract-state-router",
"version": "5.14.0",
"version": "5.14.1",
"description": "The basics of a client-side state router ala the AngularJS ui-router, but without any DOM interactions",

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

@@ -202,1 +202,26 @@ var test = require('tape-catch')

})
test('empty string is a valid default parameter', function(t) {
var state = getTestState(t)
var stateRouter = state.stateRouter
stateRouter.addState({
name: 'state',
route: '/state',
template: {},
defaultParameters: {
someParam: ''
},
querystringParameters: [ 'someParam' ],
activate: function(context) {
t.equal(context.parameters.someParam, '')
t.equal(state.location.get(), '/state?someParam=')
t.end()
}
})
stateRouter.go('state')
}, {
timeout: 1000
})
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