How to use p-wait-for - 3 common examples

To help you get started, we’ve selected a few p-wait-for examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Developmint / wait-for-netlify-preview / main.js View on Github external
;(async () => {
  await pWaitFor(deployed, { interval: 15000 })

  const { target_url: targetUrl } = await getSuccessfulDeployment()
  consola.log(targetUrl)
  return targetUrl
})()
github sindresorhus / caprine / source / ensure-online.ts View on Github external
export default async (): Promise => {
	if (!(await isOnline())) {
		const connectivityTimeout = setTimeout(showWaitDialog, 15000);

		await pWaitFor(isOnline, {interval: 1000});
		clearTimeout(connectivityTimeout);
	}
};
github timche / gmail-desktop / src / main / helpers / ensure-online.ts View on Github external
export default async (): Promise => {
  if (!(await isOnline())) {
    const connectivityTimeout = setTimeout(showWaitDialog, 15000)

    await pWaitFor(isOnline, { interval: 1000 })
    clearTimeout(connectivityTimeout)
  }
}

p-wait-for

Wait for a condition to be true

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Popular p-wait-for functions