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.1.1 to 0.1.2

test/overlapping-nexttick.tap.js

2

glue.js

@@ -81,3 +81,3 @@ var wrap = require('shimmer').wrap;

function wrapCallback(original) {
var list = [].slice.call(listeners);
var list = listeners.slice();
var length = list.length;

@@ -84,0 +84,0 @@ for (var i = 0; i < length; ++i) {

@@ -143,4 +143,23 @@ 'use strict';

// Wrap zlib streams
var zProto = Object.getPrototypeOf(require('zlib').Deflate.prototype);
wrap(zProto, "_transform", activator);
var zlib;
try { zlib = require('zlib'); } catch (err) { }
if (zlib && zlib.Deflate && zlib.Deflate.prototype) {
var proto = Object.getPrototypeOf(zlib.Deflate.prototype);
if (proto._transform) {
// streams2
wrap(proto, "_transform", activator);
}
else if (proto.write && proto.flush && proto.end) {
// plain ol' streams
massWrap(
proto,
[
'write',
'flush',
'end'
],
activator
);
}
}

@@ -147,0 +166,0 @@ // Wrap Crypto

{
"name": "async-listener",
"version": "0.1.1",
"version": "0.1.2",
"description": "Polyfill exporting trevnorris's 0.11+ process.addAsynListener API.",

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

@@ -8,9 +8,4 @@ 'use strict';

if (process.addAsyncListener) {
t.fail("this package is meant nodes without core support for async listeners");
return t.end();
}
if (!process.addAsyncListener) require('../index.js');
require('../index.js');
t.ok(process.createAsyncListener, "can create async listeners");

@@ -17,0 +12,0 @@ var counted = 0;

@@ -23,9 +23,4 @@ // Copyright Joyent, Inc. and other Node contributors.

if (process.addAsyncListener) {
console.error("meant for nodes without core support for async listeners");
process.exit(1);
}
if (!process.addAsyncListener) require('../index.js');
require('../index.js');
var assert = require('assert');

@@ -32,0 +27,0 @@ var fs = require('fs');

@@ -23,9 +23,4 @@ // Copyright Joyent, Inc. and other Node contributors.

if (process.addAsyncListener) {
console.error("meant for nodes without core support for async listeners");
process.exit(1);
}
if (!process.addAsyncListener) require('../index.js');
require('../index.js');
var assert = require('assert');

@@ -32,0 +27,0 @@ var net = require('net');

@@ -23,9 +23,4 @@ // Copyright Joyent, Inc. and other Node contributors.

if (process.addAsyncListener) {
console.error("meant for nodes without core support for async listeners");
process.exit(1);
}
if (!process.addAsyncListener) require('../index.js');
require('../index.js');
var assert = require('assert');

@@ -32,0 +27,0 @@ var net = require('net');

@@ -23,9 +23,4 @@ // Copyright Joyent, Inc. and other Node contributors.

if (process.addAsyncListener) {
console.error("meant for nodes without core support for async listeners");
process.exit(1);
}
if (!process.addAsyncListener) require('../index.js');
require('../index.js');
var assert = require('assert');

@@ -32,0 +27,0 @@ var net = require('net');

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