promise-waitfor
Just run npm install promise-waitfor
Documentation
Promise
Examples
const waitFor = ;
Alternatively, you can use a Promise constructor other than global.Promise
:
const waitFor = ;
For now more info check test.js and the index.js for further information.
Changelog
2.0.0-rc1
- Removed the second argument as it was generally confusing and can be easily replace with an extra
.then()
call, eg:waitFor(() => {...}, () => getSomething()
can be converted towaitFor() => {...)).then(getSomething)
- Updated eslint config, eslint is now a dev dependency.
2.0.0
- waitFor is now default bound to the native Promise implementation.
- In order to use a custom one you now need to use
const wf = require('promise-waitfor)'.use(MY_IMPL
.