Helpers

guessPrice.mjs

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

Target Style

Target Style

1 exports

const

pricesIn

Target Style
export const pricesIn = (text) => extractPrices(text)

Extracts price-like tokens using a more readable name.

Target style API. Preferred for new code.

Parameters

  • textstring

Returns

Array<{ type: string, value: number | number[], mod?: string }>

Legacy Style

Legacy Style

1 exports

const

guessPrice

Legacy Style
export const guessPrice = (text) => pricesIn(text)

Extracts price-like tokens from free-form text.

Returns a normalized list of objects with type, value, and optional mod.

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

Parameters

  • textstring

Returns

Array<{ type: string, value: number | number[], mod?: string }>