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.10.0 to 5.11.0

4

changelog.md

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

# 5.11.0
- functional: added a `parameters` property to the context objects emitted with the `beforeCreateState`, `afterCreateState`, `beforeResetState`, and `afterResetState` events.
# 5.10.0

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

12

index.js

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

content: content,
state: state
state: state,
parameters: parameters
})

@@ -100,3 +101,4 @@

content: content,
state: state
state: state,
parameters: parameters
})

@@ -125,3 +127,4 @@ })

state: state,
content: content
content: content,
parameters: parameters
})

@@ -139,3 +142,4 @@

domApi: domApi,
content: content
content: content,
parameters: parameters
})

@@ -142,0 +146,0 @@ return domApi

{
"name": "abstract-state-router",
"version": "5.10.0",
"version": "5.11.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",

@@ -190,6 +190,6 @@ [ui-router](https://github.com/angular-ui/ui-router/wiki) is fantastic, and I would use it in all of my projects if it wasn't tied to AngularJS.

- `beforeCreateState({state, content})`
- `afterCreateState({state, domApi, content})`
- `beforeResetState({state, domApi, content})`
- `afterResetState({state, domApi, content})`
- `beforeCreateState({state, content, parameters})`
- `afterCreateState({state, domApi, content, parameters})`
- `beforeResetState({state, domApi, content, parameters})`
- `afterResetState({state, domApi, content, parameters})`
- `beforeDestroyState({state, domApi})`

@@ -196,0 +196,0 @@ - `afterDestroyState({state})`

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

t.plan(14)
t.plan(16)

@@ -246,2 +246,3 @@ var state = getTestState(t, function() {

t.equal(context.content.value, 'legit')
t.equal(context.parameters.thingy, 'yes')
t.notOk(context.domApi)

@@ -257,2 +258,3 @@ })

t.equal(context.content.value, 'legit')
t.equal(context.parameters.thingy, 'yes')
t.equal(context.domApi, originalDomApi)

@@ -263,3 +265,5 @@

stateRouter.go('state', {})
stateRouter.go('state', {
thingy: 'yes'
})
})

@@ -345,3 +349,3 @@

t.plan(14)
t.plan(16)

@@ -384,3 +388,3 @@ var state = getTestState(t, function() {

setTimeout(function() {
stateRouter.go('state', { wat: 20 })
stateRouter.go('state', { wat: '20' })
}, 10)

@@ -401,2 +405,3 @@ }

t.equal(context.content.value, 'legit')
t.equal(context.parameters.wat, '20')
})

@@ -413,6 +418,7 @@

t.equal(context.content.value, 'legit')
t.equal(context.parameters.wat, '20')
t.end()
})
stateRouter.go('state', { wat: 10 })
stateRouter.go('state', { wat: '10' })
})
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