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

mozilla / blurts-server / #12555

pending completion
#12555

push

circleci

web-flow
Merge pull request #2862 from mozilla/MNTOR-1073/details-pie-chart

Mntor 1073/details pie chart

282 of 1394 branches covered (20.23%)

Branch coverage included in aggregate %.

21 of 21 new or added lines in 4 files covered. (100.0%)

959 of 3767 relevant lines covered (25.46%)

2.11 hits per line

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

0.0
/src/utils/string-helpers.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
/**
6
 * Convert kebab-case to camelCase
7
 *
8
 * @param {string} str - a kebab-case string
9
 * @example
10
 * camelize ('two-hump-camel')
11
 * // returns 'twoHumpCamel'
12
 */
13

14
function camelize (str) {
15
  return str.replace(/-./g, substr => substr[1].toUpperCase())
×
16
}
17

18
/**
19
 * Capitalize the first letter of a string, taking into account localization
20
 *
21
 * @param {string} str
22
 * @example
23
 * capitalFirstLetter ('carte di credito')
24
 * // returns 'Carte di credito'
25
 * @example
26
 * capitalFirstLetter ('账户余额')
27
 * // returns '账户余额'
28
 */
29

30
function capitalFirstLetter (str) {
31
  return str[0].toLocaleUpperCase() + str.slice(1)
×
32
}
33

34
export { camelize, capitalFirstLetter }
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