0.1.10 • Published 5 years ago

event-emitter-manager v0.1.10

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

event-emitter-manager

This package will provide auxiliary method's to manage EventEmitter and avoid possible Memory Leak problem.

  • install:

     const ManageEmitter = require('event-emitter-manager')()
  • Run unit Test's:

    npm run test
  • Run coverage Report:

    npm run coverage
  • Usage:

const manageEmitter = new ManageEmitter({
  inspect: true, // Auto-start the ManageEmitter verification.
  reportSeconds: 3000, // Time to next verification of Listeners OPENED.
  actionOnWarning: true, // Increase maxListeners on Warning Status.
  increment: 10, // Quantity of memory increased.
  showConsoleInspect: true // Show evaluation of verifications on reportSeconds time into Console Application. The default is false
});
  • Enable methods:
managerEmitter.listAllEvents() //Return an Array of events name.
managerEmitter.listCountProcess() //Return a Number of events opened.
manageEmitter.getMemoryInfo() //Return a Object with Application Memory informations.
manageEmitter.getMaxListeners() //Return the max listeners enable by Node instance.
manageEmitter.setLimitListener() //Set the max listeners enable by Node instance.
manageEmitter.setLimitLess() //Set maxListeners to 0. Warning, this could affect your Application Healt.
manageEmitter.manage() //Init ManageEmitter inspect.
manageEmitter.clearManager() //Stop ManageEmitter verification.

*Pay Attention: this package will increase the Memory Leak Application to avoid possible problems. For more informations, visit the EventEmitter Docs.

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.0.2

5 years ago

1.0.0

5 years ago