8 lines
220 B
JavaScript
8 lines
220 B
JavaScript
export default function areEqualValues(a, b) {
|
|
if (typeof b === 'object' && b !== null) {
|
|
return a === b;
|
|
}
|
|
|
|
// The value could be a number, the DOM will stringify it anyway.
|
|
return String(a) === String(b);
|
|
} |