npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

interval-thunk

1.0.0

@hemanth

npmHomeRepoSnykSocket
Downloads:73
$ npm install interval-thunk
DailyWeeklyMonthlyYearly

interval-thunk Build Status

setInterval Thunk.

Install

$ npm install --save interval-thunk

Usage

var intervalThunk = require('interval-thunk');

var interval = intervalThunk(function(){
  console.log('meow');
})(5000);

^ // meows, every 5000ms once.

API

intervalThunk -> func -> delay

input

Required
Type: function

The function that has to be repeatedly executed.

delay (optional)

Type: Number in ms. Default: 0

delay for the interval function to wait before each call to func.

License

MIT © hemanth