
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
aggregate multiple event emitter events + data onto a single event emitter that emits data events on change.
var es = estate()
, ee1 = new EE
, ee2 = new EE
es.listen(ee1, 'thing', ['one', 'two'])
.listen(ee2, 'data', ['two', 'three', 'four'])
ee1.emit('thing', 1, 2)
es.once('data', function(state) {
// state will be === {
// one: 1
// two: 10
// three: 20
// four: 30
// }
})
ee2.emit('data', 10, 20, 30)
es.once('data', function(state) {
// one and two will be cleared!
})
ee1.emit('thing') // since "one" and "two" are undefined, it'll clear those states
listen to an emitter on eventName. when that emitter emits that event name,
it will update the state object. the state object will then emit a 'data' event
containing the current state.
MIT
FAQs
aggregate state on a single event emitter
We found that estate 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.