(input: string, limit: number)
| 8778 | } |
| 8779 | |
| 8780 | function countCodePointsUpTo(input: string, limit: number): number { |
| 8781 | if (limit === 0) return 0 |
| 8782 | let count = 0 |
| 8783 | for (const _ of input) { |
| 8784 | if (++count >= limit) break |
| 8785 | } |
| 8786 | return count |
| 8787 | } |
| 8788 | |
| 8789 | function normalizeCardinality(value: number): number { |
| 8790 | if (!globalThis.Number.isFinite(value)) { |
no outgoing calls
no test coverage detected