New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

event-emitter-lite

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-emitter-lite - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

2

package.json
{
"name": "event-emitter-lite",
"version": "1.4.0",
"version": "1.5.0",
"description": "simple event emitter to use with typescript and pure javascript no depences",

@@ -5,0 +5,0 @@ "scripts": {

@@ -93,10 +93,7 @@ # event-emitter-lite

``` javascript
onTest.subscribe(msg => {
//...do any thing with 'msg';
onTest.resolve('finished');
});
onTest.subscribe(msg => 'finished!');
let afterEmit = onTest
.emit('its ok');
// 'finished'
// ['finished!']
```

@@ -107,10 +104,14 @@ with promise

//...do any thing with 'msg';
onTest.resolve(new Promise....);
return new Promise(sucess => {
setTimeout(() => sucess('finished!'),2000);
});
});
onTest
.emit('its ok')
.then(() => console.log('finish!!!'));
Promise.all(
onTest
.emit('its ok')
)
.then(() => console.log('finish!!!'));
```
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