parseCredits
parseCredits(
collapsed,now):ScrapedCredit|null
Defined in: src/usage-limits.ts:156
Read the “Usage credits” panel out of the already-ANSI-stripped, whitespace-collapsed capture.
This is a STANDALONE scan — it must NOT route through the section anchor/SECTION_TRAILER loop,
which lists Usagecredits as a trailer and would truncate this segment to empty. Collapsed shape:
Usagecredits▎0%used€0.29/€50.00spent·ResetsJun1(Europe/Berlin)
The gauge pct rounds down (can read 0%used while real money is spent), so spent is the truth
signal and is parsed independently of pct.
Parameters
Section titled “Parameters”collapsed
Section titled “collapsed”string
number
Returns
Section titled “Returns”ScrapedCredit | null