Skip to content

Compare

Checks equality of two strings.

compare

Performs a strict comparison between two strings.

compare('hello', 'hello') // true
compare('abc', 'ABC') // false

looseCompare

Performs a case-insensitive loose comparison between two strings.

looseCompare('CAps', 'caPS') // true
looseCompare('abc', '123') // false