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

async-emitter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-emitter - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

12

emitter.js

@@ -15,9 +15,11 @@ /**

/**
* Support both, setTimeout() and process.nextTick()
* Support for setTimeout(), nextTick() and setImmediate()
* @type {Function}
*/
Emitter.nextTick = (
typeof process !== 'undefined' &&
typeof process.nextTick === 'function'
) ? process.nextTick.bind( process ) : setTimeout.bind( this )
if( typeof setImmediate === 'function' )
Emitter.nextTick = setImmediate.bind( this )
else if( typeof process !== 'undefined' && process.nextTick )
Emitter.nextTick = process.nextTick.bind( process )
else
Emitter.nextTick = setTimeout.bind( this )

@@ -24,0 +26,0 @@ /**

{
"name": "async-emitter",
"version": "1.1.0",
"version": "1.2.0",
"description": "Non-blocking event emitter",

@@ -14,3 +14,3 @@ "license": "MIT",

"name": "Jonas Hermsmeier",
"email": "jhermsmeier@googlemail.com",
"email": "jhermsmeier@gmail.com",
"url": "http://jhermsmeier.de"

@@ -25,3 +25,3 @@ },

"main": "./emitter",
"main": "emitter",

@@ -28,0 +28,0 @@ "repository": {

@@ -1,2 +0,1 @@

# Emitter [![build status](https://secure.travis-ci.org/jhermsmeier/emitter.js.png)](http://travis-ci.org/jhermsmeier/emitter.js) [![NPM version](https://badge.fury.io/js/async-emitter.png)](https://npmjs.org/async-emitter)

@@ -8,5 +7,5 @@

Given the nature of "events", one would think event emission is *always* asynchronous.
Looking at most implementations; that's not the case. This fixes it.
Looking at most implementations; that's not the case. This fixes it by running each
handler with setTimeout/nextTick.
## Install with [npm](https://npmjs.org/)

@@ -13,0 +12,0 @@

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