wait-for-es7
WaitFor - util function which is waiting for some condition (checkFn
) during timeout
, checks it every interval
. Rejects if condition not fulfilled.
Install
npm install wait-for-es7 --save
or
yarn add wait-for-es7
Usage
; ; await waitForstartTime < new Date.getTime - 4000, ;// Not rejected, because 4000ms < 5000ms await waitForfalse, ;// Will reject, because checkFn always return false
API
;
Test
npm install
npm test