meanwhile

check for truth at a specified interval, meanwhile keep working

npm install meanwhile
4 downloads in the last week
8 downloads in the last month

NAME

meanwhile(3)

SYNOPSIS

Some setInterval sugar. A program keeps running, meanwhile a check is performed at a specified interval and if the resut is true, a callback gets called.

EXAMPLE

var meanwhile = require('meanwhile')
var x = false

meanwhile(
  function() { return x },
  function() { console.log('x is now true') }
)

x = true
npm loves you