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

joniflink / comp-se-200-assignment-part2 / 19835145086

01 Dec 2025 07:38PM UTC coverage: 88.356% (+88.4%) from 0.0%
19835145086

push

github

web-flow
Update package.json

36 of 49 branches covered (73.47%)

Branch coverage included in aggregate %.

222 of 243 relevant lines covered (91.36%)

1.98 hits per line

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

81.48
/src/.internal/baseToNumber.js
1
import isSymbol from '../isSymbol.js'
1✔
2

1✔
3
/** Used as references for various `Number` constants. */
1✔
4
const NAN = 0 / 0
1✔
5

1✔
6
/**
1✔
7
 * The base implementation of `toNumber` which doesn't ensure correct
1✔
8
 * conversions of binary, hexadecimal, or octal string values.
1✔
9
 *
1✔
10
 * @private
1✔
11
 * @param {*} value The value to process.
1✔
12
 * @returns {number} Returns the number.
1✔
13
 */
1✔
14
function baseToNumber(value) {
14✔
15
  if (typeof value === 'number') {
14✔
16
    return value
14✔
17
  }
14!
18
  if (isSymbol(value)) {
×
19
    return NAN
×
20
  }
×
21
  return +value
×
22
}
14✔
23

1✔
24
export default baseToNumber
1✔
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