equals
Value equality with Object.is semantics; suitable for precise comparisons.
import { equals } from 'is-kit';equals(1, 1); // trueequals(NaN, NaN); // true (Object.is semantics)
equalsBy / equalsKey
Compare by derived values or by property keys when building guards.
import { equalsBy, equalsKey, isString } from 'is-kit';// Build a comparator in two steps for clarityconst lengthOfString = equalsBy(isString)((s) => s.length);const isLength3 = lengthOfString(3 as const);isLength3('foo'); // true// Key-based equality guardconst hasId1 = equalsKey('id', 1 as const);hasId1({ id: 1 }); // true