A variable interval. The timeout period can be changed dynamically.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Makefile
README.md
component.json
index.js
package.json

README.md

a variable interval

dynamically change your interval period

Install

npm install intervarl or component install marcelklehr/intervarl

Usage

var setInterval = require('intervarl').setInterval

var interval = setInterval(function() {
  console.log('ShAZzAmM')
  if(interval.period < 20000) return interval.period = interval.period+1000
  interval.period = interval.period-1000
}, 0)

setTimeout(function() {
  interval.stop()
}, 60000)

License

MIT