(slots: IntlCollatorInternal)
| 399 | } |
| 400 | |
| 401 | function levelCount(slots: IntlCollatorInternal): number { |
| 402 | // ECMA-402 sensitivity selects how many UCA levels participate in |
| 403 | // CompareStrings: base=primary, accent=primary+secondary, |
| 404 | // case/variant include tertiary handling in this compact implementation. |
| 405 | // https://tc39.es/ecma402/#sec-properties-of-intl-collator-instances |
| 406 | switch (slots.sensitivity) { |
| 407 | case 'base': |
| 408 | return 1 |
| 409 | case 'accent': |
| 410 | return 2 |
| 411 | case 'case': |
| 412 | return 3 |
| 413 | default: |
| 414 | return 4 |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | function compareCollationElements( |
| 419 | left: readonly PackedCollationElement[], |
no outgoing calls
no test coverage detected