0.0.8 • Published 10 months ago
mk_wait v0.0.8
mk-wait
mk-wait
is a simple utility function that returns a Promise which resolves after a specified delay. This function can be useful when you want to pause the execution of an asynchronous function for a certain amount of time.
Installation
You can install mk_wait
using npm:
npm install mk_wait
Default Delay Example
If no delay is passed, the function will wait for the default 1000 milliseconds:
const wait = require('mk_wait');
(async () => {
console.log('Start waiting...');
// Wait for the default 1 second
await wait();
console.log('Finished waiting after 1 second!');
})();