• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

react-ui-org / react-ui / 13653729441

04 Mar 2025 12:29PM UTC coverage: 91.956%. Remained the same
13653729441

Pull #585

github

web-flow
Merge 83ef9990d into b781c285b
Pull Request #585: Docs/improve class names docs

785 of 859 branches covered (91.39%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

724 of 782 relevant lines covered (92.58%)

72.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.3
/src/utils/mergeDeep.js
1
const isObject = (obj) => obj && typeof obj === 'object' && !Array.isArray(obj);
164✔
2

3
/**
4
 * Performs a deep merge of objects and returns new object.
5
 *
6
 * @param {...object} objects
7
 * @returns {object}
8
 */
9
export const mergeDeep = (...objects) => objects.reduce((prev, obj) => {
82✔
10
  if (obj == null) {
76!
11
    return prev;
×
12
  }
13

14
  const newObject = { ...prev };
76✔
15

16
  Object.keys(obj).forEach((key) => {
76✔
17
    const previousVal = prev[key];
142✔
18
    const currentVal = obj[key];
142✔
19

20
    if (isObject(previousVal) && isObject(currentVal)) {
142✔
21
      newObject[key] = mergeDeep(previousVal, currentVal);
20✔
22
    } else {
23
      newObject[key] = currentVal;
122✔
24
    }
25
  });
26

27
  return newObject;
76✔
28
}, {});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc