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 4.0.0 to 4.1.0

7

index.js

@@ -240,4 +240,7 @@ var StateState = require('./state-state')

}
stateProviderEmitter.stateIsActive = function stateIsActive(stateName) {
return current.get().name.indexOf(stateName) === 0
stateProviderEmitter.stateIsActive = function stateIsActive(stateName, opts) {
var currentState = current.get()
return currentState.name.indexOf(stateName) === 0 && (typeof opts === 'undefined' || Object.keys(opts).every(function matches(key) {
return opts[key] === currentState.parameters[key]
}))
}

@@ -244,0 +247,0 @@

{
"name": "abstract-state-router",
"version": "4.0.0",
"version": "4.1.0",
"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",

@@ -283,3 +283,3 @@ var test = require('tape')

t.plan(4)
t.plan(6)

@@ -310,7 +310,10 @@ stateRouter.addState({

t.notOk(stateRouter.stateIsActive('parent.child1', { butts: 'no' }), 'shouldn\'t match wuth butts=no')
t.ok(stateRouter.stateIsActive('parent.child1', { butts: 'yes' }), 'should match with butts=yes')
t.end()
})
stateRouter.go('parent.child1')
stateRouter.go('parent.child1', { butts: 'yes' })
})
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