Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

560 B
Raw Blame
let baseSensitivityCollator: Intl.Collator | undefined
let numericCollator: Intl.Collator | undefined

export function compareBaseSensitivityLocaleText(a: string, b: string): number {
  // Resolve ICU options once, lazily like localeCompare.
  baseSensitivityCollator ??= new Intl.Collator(undefined, { sensitivity: 'base' })
  return baseSensitivityCollator.compare(a, b)
}

export function compareNumericLocaleText(a: string, b: string): number {
  numericCollator ??= new Intl.Collator(undefined, { numeric: true })
  return numericCollator.compare(a, b)
}