0.1.5 • Published 8 years ago

repeatit v0.1.5

Weekly downloads
8
License
ISC
Repository
-
Last release
8 years ago
'use strict';

// Require the package
var rep = require('repeatit');

// Create the functions to be repeated
var f1 = function () {
  console.log('message1');
};

var f2 = function () {
  console.log('message2');
};

// Create the repeaters, time is in milliseconds and defaults to 1000
var x = rep.createRepeater(f1, 3000);
var y = rep.createRepeater(f2, 1000);

// Start the timers
x.start();
y.start();

// Wait a while then stop the timers.
setTimeout(function () {
  x.stop();
  y.stop();
}, 20000);
0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago