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 3.0.0 to 3.1.0

12

index.js

@@ -33,5 +33,6 @@ var StateState = require('./state-state')

function handleError(event, err) {
if (!stateProviderEmitter.emit(event, err)) {
process.nextTick(function() {
stateProviderEmitter.emit(event, err)
console.error(err)
}
})
}

@@ -223,2 +224,9 @@

}
stateProviderEmitter.evaluateCurrentRoute = function evaluateCurrentRoute(defaultRoute, defaultParams) {
return getDestinationUrl(defaultRoute, defaultParams).then(function(defaultPath) {
hashRouter.evaluateCurrent(defaultPath)
}).catch(function(err) {
handleError('error', err)
})
}

@@ -225,0 +233,0 @@ return stateProviderEmitter

2

package.json
{
"name": "abstract-state-router",
"version": "3.0.0",
"version": "3.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",

@@ -68,2 +68,6 @@ To manage webapp states so that you don't have to deal with url paths or anything.

# stateRouter.evaluateCurrentRoute(defaultRoute, defaultParameters)
You'll want to call this once you've added all your initial states. It causes the current path to be evaluated, and will activate the current state. If the current path doesn't match the route of any available states, the browser gets sent to the default route provided.
# State change flow

@@ -70,0 +74,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