@lukaspolak/wait-for-timeout
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

wait-for-timeout

checks-status workflow/status codecov npm bundle size npm

Promise based utility function that return a value after specified timeout.

Demo

CodeSandbox

Getting started

To use this package, you only need to install this dependency, import it and invoke the waitForTimeout function, e.g.:

const response = waitForTimeout<boolean>(() => {
  return true
}, 500)

//...

await response // returns `true` after 500ms

Install

npm install @lukaspolak/wait-for-timeout

or

yarn add @lukaspolak/wait-for-timeout

Contributing

Please read the Contribution guidelines to start with your awesome contributions!

Why the library is prefixed with @lukaspolak/

There are a lot of similar libraries/packages on GitHub and npm, that can do the same. I wanted to enhance my programming skills, and I didn't want to find a unique name for the package.

INITIALIZATION TODO

Package Sidebar

Install

npm i @lukaspolak/wait-for-timeout

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

16.3 kB

Total Files

6

Last publish

Collaborators

  • lukaspolak