![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
asr-fsm-navigation
Advanced tools
Use a fsm finite state machine definition to navigate around an abstract-state-router application using dispatch events
Given an fsm description of how users should be able to navigate between states:
Watches for dispatch
and dispatchInput
events, interprets the first argument to be the action type, and when it sees one it has a command for, it tells the abstract-state-router to navigate to that state (inheriting all parameters from the current state).
const asrFsmNavigation('asr-fsm-navigation')
const makeAsrStateWatcher = require('asr-active-state-watcher')
const stateWatcher = makeAsrStateWatcher(stateRouter)
const startFsmNavigation = asrFsmNavigation(stateRouter, stateWatcher)
var stopNavigating = startFsmNavigation({
'parent1': {
GO_TO_PARENT2_CHILD1: 'parent2.child1',
GO_TO_PARENT2_CHILD2: 'parent2.child2'
},
'parent2.child1': {
GO_TO_PARENT1: 'parent1'
},
'parent2.child2': {
GO_TO_PARENT1: 'parent1',
GO_TO_PARENT1_CHILD2: 'parent1.child2'
}
})
If the user is at the parent1.child1 state and dispatches a GO_TO_PARENT2_CHILD1 event, the module will navigate to the parent2.child1 state.
You can pass in an options object when you start the navigator. Defaults to { inherit: true }
.
const startFsmNavigation = asrFsmNavigation(stateRouter, stateWatcher)
startFsmNavigation({
'parent1': {
GO_TO_PARENT2_CHILD1: 'parent2.child1',
GO_TO_PARENT2_CHILD2: 'parent2.child2'
},
'parent2.child2': {
GO_TO_PARENT1: 'parent1',
}
}, {
inherit: false
})
For each action, you can specify particular parameter values that will be set when navigating to the next state.
To do this, give an object with name/parameters parameters, instead of a string for a state destination:
const startFsmNavigation = asrFsmNavigation(stateRouter, stateWatcher)
startFsmNavigation({
'parent1.child1': {
GO_TO_PARENT2_CHILD1: {
name: 'parent2.child1',
parameters: {
shiny: 'yes'
}
}
},
'parent2.child1': {
GO_TO_PARENT1: 'parent1',
}
}, {
inherit: false
})
FAQs
Use a fsm finite state machine definition to navigate around an abstract-state-router application using dispatch events
The npm package asr-fsm-navigation receives a total of 6 weekly downloads. As such, asr-fsm-navigation popularity was classified as not popular.
We found that asr-fsm-navigation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.