Helpers

delay.mjs

@mr_ozio/scraper-utils · v2.5.0 · Generated April 21, 2026

Target Style

Target Style

1 exports

const

waitFor

Target Style
export const waitFor = (ms) => {

Waits for the given amount of milliseconds.

Target style API. Preferred for new code.

Parameters

  • msnumber

Returns

Promise<void>

Example

await waitFor(250)

Legacy Style

Legacy Style

1 exports

const

delay

Legacy Style
export const delay = (ms) => waitFor(ms)

Resolves after the given amount of milliseconds.

Legacy API. Kept for older code and not the preferred choice for new code.

Parameters

  • msnumber

Returns

Promise<void>