Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

346 B
Raw Blame
/**
 * Two texts by their UTF-16 code units: the order a bare `sort()` gives, and
 * the same on every machine. A hash or a key built over the order must not
 * depend on the locale the code runs in, as `localeCompare` does.
 */
export function compareCodeUnits(a: string, b: string): number {
  if (a === b) return 0;
  return a < b ? -1 : 1;
}