6 lines
230 B
JavaScript
6 lines
230 B
JavaScript
export function localeCompare(a, b) {
|
|
// console.log(localeCompare, a, b);
|
|
return typeof a === 'string' && typeof b === 'string'
|
|
? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0
|
|
: a === b;
|
|
} |