We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e711e83 commit aa298daCopy full SHA for aa298da
1 file changed
src/recursion.js
@@ -48,12 +48,14 @@ const checkMatchingLeaves = (obj) => {
48
*/
49
var values = [];
50
51
- (function rec(param) {
52
- Object.keys(param).forEach(function(key) {
53
- if (typeof param[key] === 'object') return rec(param[key]);
54
- values.push(param[key])
55
- })
56
- })(obj);
+ (
+ function rec(param) {
+ Object.keys(param).forEach(function(key) {
+ if (typeof param[key] === 'object') return rec(param[key]);
+ values.push(param[key])
+ })
57
+ }
58
+ )(obj);
59
60
return values.every( x => values[0] === x);
61
};
0 commit comments