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

Agglu / softwaretesting / 19500927678

19 Nov 2025 12:14PM UTC coverage: 0.235%. First build
19500927678

push

github

Aleksanteri Heinonen
import functions to test manually so no more tricky node_modules implementations

0 of 224 branches covered (0.0%)

Branch coverage included in aggregate %.

1 of 201 new or added lines in 43 files covered. (0.5%)

1 of 201 relevant lines covered (0.5%)

0.01 hits per line

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

0.0
/src/defaultTo.js
1
/**
2
 * Checks `value` to determine whether a default value should be returned in
3
 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
4
 * or `undefined`.
5
 *
6
 * @since 4.14.0
7
 * @category Util
8
 * @param {*} value The value to check.
9
 * @param {*} defaultValue The default value.
10
 * @returns {*} Returns the resolved value.
11
 * @example
12
 *
13
 * defaultTo(1, 10)
14
 * // => 1
15
 *
16
 * defaultTo(undefined, 10)
17
 * // => 10
18
 */
19
function defaultTo(value, defaultValue) {
NEW
20
  return value == null ? defaultValue : value
×
21
}
22

23
export default defaultTo
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