wait-for-online
v0.1.0
Published
Wait for a browser to be online
Downloads
5
Maintainers
Readme
wait-for-online
Wait for a browser to be online
Good for the chain of promises or async
/await
.
Install
npm install --save wait-for-online
Usage
import waitForOnline from 'wait-for-online'
async function send (data) {
await waitForOnline()
await sendToApi(data)
}
send({foo: 1})
API
waitForOnline([timeout])
Returns a promise that resolves, when browser will be online.
timeout
Type: number
Default: Infinity
Waiting timeout.
License
MIT