wait-for-timeout

waitForTimeout helper function

Usage no npm install needed!

<script type="module">
  import waitForTimeout from 'https://cdn.skypack.dev/wait-for-timeout';
</script>

README

waitForTimeout

waitForTimeout helper function

install

npm install wait-for-timeout

or

yarn add wait-for-timeout

Usage

import { waitForTimeout } from "wait-for-timeout";

waitForTimeout<string>(() => {
  return "Hello, world!";
}, 500).then((response) => {
  console.log({ response }); // "Hello, world!"
});

TODO

  • Implement husky
  • Implement prettier & eslint
  • Implement github actions
  • Update documentation