npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

afo-interval

1.0.1 • Public • Published

Interval

A simple OOP-style wrapper for setInterval.

var Interval = require('afo-interval');
 
var timer = new Interval(function(){
    console.log(new Date().toISOString());
},1000,true); // every 1s, automatically start
 
timer.pause(); // pause it
 
timer.resume(); // resume it
 
timer.unref(); // unref it
 
timer.ref(); // re-ref it
 
// ... and more
 
// auto-start is optional, defaults to false
new Interval(function(){},1000);

Keywords

install

npm i afo-interval

Downloadsweekly downloads

0

version

1.0.1

license

BSD-3-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability