Skip to content

hemanth/interval-thunk

Repository files navigation

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

About

setInterval thunk.

Resources

License

Stars

Watchers

Forks

Packages

No packages published