0.2.2 • Published 11 years ago

behave v0.2.2

Weekly downloads
76
License
-
Repository
github
Last release
11 years ago

Behave

Behave wraps a function to limit the amount of times it can be called, then calls the notifier function once that limit has been reached.

npm tag

Usage

var behave = require('behave');

var myfunc = behave(5, function() {
  console.log('Hello');
}, function() {
  console.log('Good bye');
});

for (var i = 0; i < 20; i++) {
  myfunc();
}

The above example will print.

Hello
Hello
Hello
Hello
Hello
Good Bye
0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago