Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanoevents

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoevents - npm Package Compare versions

Comparing version 5.1.5 to 5.1.6

3

CHANGELOG.md

@@ -5,2 +5,5 @@ # Change Log

## 5.1.5
* Clean up code.
## 5.1.5
* Fix ES module regression.

@@ -7,0 +10,0 @@

4

index.d.ts

@@ -41,3 +41,3 @@ interface EventsMap {

*/
on <K extends keyof Events>(this: this, event: K, cb: Events[K]): Unsubscribe
on<K extends keyof Events> (this: this, event: K, cb: Events[K]): Unsubscribe

@@ -54,3 +54,3 @@ /**

*/
emit <K extends keyof Events>(
emit<K extends keyof Events> (
this: this,

@@ -57,0 +57,0 @@ event: K,

let createNanoEvents = () => ({
events: { },
events: {},
emit (event, ...args) {

@@ -9,6 +9,4 @@ for (let i of this.events[event] || []) {

on (event, cb) {
(this.events[event] = this.events[event] || []).push(cb)
return () => (
this.events[event] = this.events[event].filter(i => i !== cb)
)
;(this.events[event] = this.events[event] || []).push(cb)
return () => (this.events[event] = this.events[event].filter(i => i !== cb))
}

@@ -15,0 +13,0 @@ })

{
"name": "nanoevents",
"version": "5.1.5",
"version": "5.1.6",
"description": "Simple and tiny (72 bytes) event emitter library",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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