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

syarul / requrse / 15845424534

24 Jun 2025 08:31AM UTC coverage: 99.174% (+0.4%) from 98.818%
15845424534

push

github

web-flow
Merge pull request #8 from syarul/refactor

Refactor

177 of 183 branches covered (96.72%)

Branch coverage included in aggregate %.

735 of 736 new or added lines in 13 files covered. (99.86%)

783 of 785 relevant lines covered (99.75%)

83.04 hits per line

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

82.61
/libs/dataPath.cjs
1
// @ts-check
10✔
2

10✔
3
/**
10✔
4
 * Converts result into data path mapping
10✔
5
 *
10✔
6
 * @param {any} data - The data to map.
10✔
7
 * @returns {any} The final output.
10✔
8
 */
10✔
9
const dataPath = (data, paths = "") => {
10✔
10
  return paths.split("/").reduce((final, path) => {
1✔
11
    if (final instanceof Array) {
3!
NEW
12
      return final.map((item) => item[path] || data[path]);
×
13
    }
×
14
    return (final && final[path]) || data[path];
3!
15
  }, data);
1✔
16
};
10✔
17

10✔
18
module.exports = dataPath;
10✔
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

© 2026 Coveralls, Inc