8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cdcdf5 commit d695088Copy full SHA for d695088
src/utils.js
@@ -32,6 +32,8 @@ module.exports = {
32
return false;
33
} else if (Array.isArray(a)) {
34
return !this.arraysDiffer(a, b);
35
+ } else if (typeof a === 'function') {
36
+ return a.toString() === b.toString();
37
} else if (typeof a === 'object' && a !== null && b !== null) {
38
return !this.objectsDiffer(a, b);
39
}
tests/Utils-spec.js
@@ -25,6 +25,10 @@ export default {
25
test.equal(utils.isSame(objA, objH), false);
26
test.equal(utils.isSame(objG, objA), false);
27
28
+ test.equal(utils.isSame(() => {}, () => {}), true);
29
+ test.equal(utils.isSame(objA, () => {}), false);
30
+ test.equal(utils.isSame(() => {}, objA), false);
31
+
test.done();
0 commit comments