Helpers

fikaCheck.mjs

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

Target Style

Target Style

2 exports

const

waitForFika

Target Style
export const waitForFika = async ({ fromMinute = FIKA_FROM, toMinute = FIKA_TO } = {}) => {

Waits until a blocked minute range has passed.

Target style API. Preferred for new code.

Parameters

  • [options]{ fromMinute?: number, toMinute?: number }

Returns

Promise<void>

const

waitForFile

Target Style
export const waitForFile = async ({ at }) => {

Waits until a file appears on disk.

Target style API. Preferred for new code.

Parameters

  • options{ at: string }

Returns

Promise<void>

Example

await waitForFile({
  at: '/tmp/ready.flag',
})

Legacy Style

Legacy Style

1 exports

const

fikaCheck

Legacy Style
export const fikaCheck = async (fromMinute = FIKA_FROM, toMinute = FIKA_TO) => {

Waits until the blocked minute range has passed.

When the first argument is a string, it waits until that file appears.

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

Parameters

  • [fromMinute=FIKA_FROM]number | string
  • [toMinute=FIKA_TO]number

Returns

Promise<void>