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

wtfnode

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wtfnode - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

15

index.js

@@ -74,9 +74,2 @@ #!/usr/bin/env node

// This is intended to interact "cleverly" with node's EventEmitter logic.
// EventEmitter itself sometimes wraps the event handler callbacks to implement
// things such as once(). See https://github.com/nodejs/node/blob/v6.0.0/lib/events.js#L280
// In order for removeListener to still work when called with the original unwrapped function
// a .listener member is added to the stored callback which contains the original unwrapped function
// and the removeListener logic checks this member as well to match wrapped listeners.
var stack = __stack;

@@ -152,2 +145,8 @@

args[1] = wrapFn(args[1], args[1].name, null);
// This is intended to interact "cleverly" with node's EventEmitter logic.
// EventEmitter itself sometimes wraps the event handler callbacks to implement
// things such as once(). See https://github.com/nodejs/node/blob/v6.0.0/lib/events.js#L280
// In order for removeListener to still work when called with the original unwrapped function
// a .listener member is added to the callback which references the original unwrapped function
// and the removeListener logic checks this member as well to match wrapped listeners.
args[1].listener = arguments[1];

@@ -193,3 +192,3 @@ }

// node 0.10 doesn't expose the ChildProcess constructor, so we have to get it on the sly
var cp = require('child_process').spawn('true', { stdio: 'ignore' });
var cp = require('child_process').spawn('true', [], { stdio: 'ignore' });
ChildProcess = cp.constructor;

@@ -196,0 +195,0 @@ }

{
"name": "wtfnode",
"version": "0.3.4",
"version": "0.3.5",
"description": "Utility to help find out why Node isn't exiting",

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

@@ -42,1 +42,23 @@ 'use strict';

testEventEmitter();
function testInterval() {
var timer;
timer = setInterval(function () {
throw new Error('Timer callback should not run');
}, 0);
clearInterval(timer);
timer = setTimeout(function () {
throw new Error('Timer callback should not run');
}, 0);
clearTimeout(timer);
if (typeof setImmediate === 'undefined') { return; }
timer = setImmediate(function () {
throw new Error('Timer callback should not run');
}, 0);
clearImmediate(timer);
}
testInterval();
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