Skip to content

eq

Summary

Functional equivalent of a === b. Use Object.is.

Tip

This is an operator function.

Examples

1
2
3
4
5
const eq42 = eq(42);
eq42(42); //=> true
eq42('42'); //=> false (1)
eq(NaN, NaN); //=> true
  1. failed: not the same type

Parameters

Name Type Description
a ?
b ?

Return

boolean

AltStyle によって変換されたページ (->オリジナル) /