Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/core/mod.ts>Eq.createStringCollatorEq

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Eq.createStringCollatorEq
import { Eq } from "https://deno.land/x/rimbu@0.13.5/core/mod.ts";
const { createStringCollatorEq } = Eq;

Returns an Eq instance that considers strings equal taking the given or default locale into account.

Examples

Example 1

const eq = Eq.createStringCollatorEq()
console.log(eq('a', 'a'))
// => true
console.log(eq('abc', 'aBc'))
// => false

Parameters

...args: ConstructorParameters<Intl.Collator>
  • (optional) a locale or list of locales

Returns

Eq<string>