
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
riotcontrol-requirejs
Advanced tools
Event Controller / Dispatcher For RiotJS, Inspired By Flux - support for requirejs
npm install riotcontrol-requirejs
A Simplistic Central Event Controller / Dispatcher For RiotJS, Inspired By Facebook's Flux Architecture Pattern.
RiotControl is, in the spirit of Riot itself, extremely lightweight. It forgoes elements of Flux, to favor small and simple applications. RiotControl passes events from views to stores, and back, relying heavily on Riot's observerable API. Stores can talk to many views, and views can talk to many stores.
Requires Riot 2.0+
Include riotcontrol.js, or it's few lines of code, in your project.
Register the store in central dispatch, where store is a riot.observable(). Generally, all stores should be created and registered before the Riot app is mounted.
RiotControl.addStore(store)
// Example, at start of application:
var todoStore = new TodoStore() // Create a store instance.
RiotControl.addStore(todoStore) // Register the store in central dispatch.
Trigger event on all stores registered in central dispatch. Essentially, a 'broadcast' version of Riot's el.trigger() API.
RiotControl.trigger(event)
RiotControl.trigger(event, arg1 ... argN)
// Example, inside Riot view (tag):
RiotControl.trigger('todo_add', { title: self.text })
Listen for event, and execute callback when it is triggered. This applies to all stores registered, so that you may receive the same event from multiple sources.
RiotControl.on(event, callback)
// Example, inside Riot view (tag):
RiotControl.on('todos_changed', function(items) {
self.items = items
self.update()
})
Remove event listener.
RiotControl.off(event)
RiotControl.off(event, callback)
Same as RiotControl.on(), executes once.
RiotControl.one(event, callback)
FAQs
Event Controller / Dispatcher For RiotJS, Inspired By Flux - support for requirejs
We found that riotcontrol-requirejs 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.