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 1.0.0 to 1.0.1

3

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 1.0.1
* Reduce size (by Anton Khlynovskiy).
## 1.0

@@ -5,0 +8,0 @@ * Remove `NanoEvents#once` method.

16

index.js

@@ -54,12 +54,10 @@ /**

var events = this.events
// event variable is reused and repurposed, now it's an array of handlers
event = this.events[event] = this.events[event] || []
event.push(cb)
if (events[event]) {
events[event].push(cb)
} else {
events[event] = [cb]
}
return function () {
events[event].splice(events[event].indexOf(cb) >>> 0, 1)
// a.splice(i >>> 0, 1) === if (i !== -1) a.splice(i, 1)
// -1 >>> 0 === 0xFFFFFFFF, max possible array length
event.splice(event.indexOf(cb) >>> 0, 1)
}

@@ -85,3 +83,3 @@ },

list.slice().map(function (i) {
i.apply(this, args)
i.apply(this, args) // this === global or window
})

@@ -88,0 +86,0 @@ }

{
"name": "nanoevents",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple and tiny (130 bytes) event emitter library",

@@ -22,3 +22,3 @@ "keywords": [

"docdash": "^0.4.0",
"eslint": "^4.7.0",
"eslint": "^4.7.1",
"eslint-config-logux": "^16.2.0",

@@ -38,3 +38,3 @@ "eslint-config-standard": "^10.2.1",

"rimraf": "^2.6.2",
"size-limit": "^0.11.3",
"size-limit": "^0.11.4",
"yaspeller-ci": "^0.7.0"

@@ -69,3 +69,3 @@ },

"path": "index.js",
"limit": "130 B"
"limit": "124 B"
}

@@ -72,0 +72,0 @@ ],

@@ -6,3 +6,3 @@ # Nano Events

* No Node.js [EventEmitter] compatibility.
* Only 130 bytes (minified and gzipped). It uses [Size Limit] to control size.
* Only 124 bytes (minified and gzipped). It uses [Size Limit] to control size.
* `on` method returns `unbind` function. You don’t need to save

@@ -9,0 +9,0 @@ callback to variable for `removeListener`.

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