Skip to content

yguan/wait-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple wait class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published