
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
event-abstract-class
Advanced tools
ES6 abstract class to extend and allow classes to support native object event binding/triggering.
ES6 abstract class to extend and allow classes to support native object event binding/triggering.
import EventAbstractClass from 'event-abstract-class'
class Example extends EventAbstractClass {
constructor () {
super()
this.value = null
}
setValue (value) {
let oldValue = this.value
this.trigger('setValue:pre', {
newValue: value
})
this.value = value
this.trigger('setValue:post', {
newValue: value,
oldValue: oldValue
})
}
}
let example = new Example()
example.on('setValue:post', (args) => {
console.log('oldValue', args.oldValue)
console.log('newValue', args.newValue)
})
example.setValue('New value 1!')
example.setValue('New value 2!')
FAQs
ES6 abstract class to extend and allow classes to support native object event binding/triggering.
The npm package event-abstract-class receives a total of 1,096 weekly downloads. As such, event-abstract-class popularity was classified as popular.
We found that event-abstract-class 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.