1.1.0 • Published 9 years ago

active-handles v1.1.0

Weekly downloads
118
License
MIT
Repository
github
Last release
9 years ago

active-handles build status

Prints out information about the process's active handles, including function source and location.

var activeHandles = require('active-handles');

// run your program, launch a server, call setTimeout or similar
// in order to create some handles and then call the below

activeHandles.print();

assets/mixed.png

Shows handles of multiple types created via examples/mixed.js

Installation

npm install active-handles

Caveats

For any version <= v1.6.2 the setInterval function has to be hooked in order for this to work for setInterval created handles.

In order to do that call activeHandles.hookSetInterval() before any calls to setInterval occurr. This is demonstrated in this example.

Handles of net and http modules log handles from inside core instead of your handle, leaving you to hunt down where you created these connections.

API

generated with docme

core

A core module which depends only on function-origin can be used. It behaves exactly like the main module except that it doesn't merge opts with default options and provides no highlighting even if highlight is set in the options. Additionally it does not include the print feature.

You can use it as follows:

var activeHandles = require('active-handles/core');
activeHandles();

License

MIT