interval-thunk

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i interval-thunk

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hemanth