0.0.2 • Published 9 years ago

wait-js v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

wait-js

This repository contains a simple class for waiting condition to be met. This is a modification of waitfor.js from https://github.com/ariya/phantomjs/blob/master/examples/waitfor.js

Usage

var wait = require('wait-js');

wait.for({
    testFn: function () {
        // check if condition is met
    },
    onReady: function () {
        // thing to do when the condition is met
    },
    onTimeout: function () {
        // thing to do when timeout occurs
    },
    timeoutMs: 3000
});

License

MIT

0.0.2

9 years ago

0.0.1

9 years ago