New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

increment-fire

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

increment-fire

A simple way of keeping track of asynchronous events.

latest
Source
npmnpm
Version
0.8.0
Version published
Maintainers
1
Created
Source

increment-fire

A simple way of keeping track of asynchronous events.

When you have tried all the promises libraries and found that they all have this "thing", that make it unusable in your case: increment-fire...

This is a BETA version

As soon as the module has shown it's worth and stability on a live system, it will be marked as version >= 1.0.0.

Until then: Feel free to play around with it, learn from it.

Note: this code has already been running on a node.js 0.6.6 live system for many months.

To install

npm install increment-fire

Simple example

var IncFire = require('./index');
var incFire = new IncFire();

incFire.on(2, function() {
  console.log('incFire has counted to 2');
});

incFire.on(4, function() {
  console.log('incFire has counted to 4');
});

// Run and increment
for(var i=0 ; i < 10 ; i++) {
  setTimeout(function() {
    firstFire.inc(1); // Increment by 1 (which is actually the default)
    secondFire.inc();
  }, i*250);
}

You can see a bit more elaborate example in the example.js file.

Keywords

increment

FAQs

Package last updated on 06 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts