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

async-listener

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-listener - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

29

index.js

@@ -33,2 +33,31 @@ 'use strict';

var net = require('net');
// a polyfill in our polyfill etc so forth -- taken from node master on 2013/10/30
if (!net._normalizeConnectArgs) {
net._normalizeConnectArgs = function (args) {
var options = {};
function toNumber(x) { return (x = Number(x)) >= 0 ? x : false; }
if (typeof args[0] === 'object' && args[0] !== null) {
// connect(options, [cb])
options = args[0];
}
else if (typeof args[0] === 'string' && toNumber(args[0]) === false) {
// connect(path, [cb]);
options.path = args[0];
}
else {
// connect(port, [host], [cb])
options.port = args[0];
if (typeof args[1] === 'string') {
options.host = args[1];
}
}
var cb = args[args.length - 1];
return typeof cb === 'function' ? [options, cb] : [options];
};
}
wrap(net.Server.prototype, '_listen2', function (original) {

@@ -35,0 +64,0 @@ return function () {

2

package.json
{
"name": "async-listener",
"version": "0.4.2",
"version": "0.4.3",
"description": "Polyfill exporting trevnorris's 0.11+ asyncListener API.",

@@ -5,0 +5,0 @@ "author": "Forrest L Norvell <ogd@aoaioxxysz.net>",

@@ -0,1 +1,3 @@

[![NPM](https://nodei.co/npm/async-listener.png?downloads=true&stars=true)](https://nodei.co/npm/async-listener/)
# process.addAsyncListener polyfill

@@ -2,0 +4,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