Skip to main content

deterministicCompare

@hardkas/core


@hardkas/core / deterministicCompare

Function: deterministicCompare()

deterministicCompare(a, b): number

Defined in: packages/core/src/deterministic.ts:5

Deterministic comparison utility for cross-platform string sorting. Avoids localeCompare() which is dependent on the host machine's ICU version and OS locale.

Parameters​

a​

string

b​

string

Returns​

number