Skip to content
pranavkhapraPublic

About

Returns a promise that resolves after how many milliseconds you pass it.Great for waiting any amount of time. If you do not pass it any value, it will immediately resolve.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

wwait

Hold on a sec, or the time you pass it.

wait() Returns a promise that resolves after how many milliseconds you pass it.

Great for waiting any amount of time. If you do not pass it any value, it will immediately resolve. This is handy when you need to ensure the following code is put at the end of the JS event callstack.

Usage

import wait from 'wwait';

async function doWhatFunctionSays() {
  doSomething();
  await wait();
  doSomethingElse();
  await wait(300);
  console.log('300ms later');
}

About

Returns a promise that resolves after how many milliseconds you pass it.Great for waiting any amount of time. If you do not pass it any value, it will immediately resolve.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages