@vyriy/pause
Part of Vyriy - a calm architecture toolkit for TypeScript, React, SSR, SSG, APIs, and cloud-ready apps.
Shared pause utility for Vyriy projects.
Purpose
This package provides a tiny promise-based delay helper for async flows where code should wait for a fixed amount of time before continuing.
Install
With npm:
npm install @vyriy/pause
With Yarn:
yarn add @vyriy/pause
Usage
import { pause } from '@vyriy/pause';
await pause(250);
console.log('continued after 250ms');
API
pause(ms)returns aPromise<void>that resolves aftermsmilliseconds.