MCPcopy
hub / github.com/tj/commander.js / camelcase

Function camelcase

lib/option.js:316–320  ·  view source on GitHub ↗

* Convert string from kebab-case to camelCase. * * @param {string} str * @return {string} * @private

(str)

Source from the content-addressed store, hash-verified

314 */
315
316function camelcase(str) {
317 return str.split('-').reduce((str, word) => {
318 return str + word[0].toUpperCase() + word.slice(1);
319 });
320}
321
322/**
323 * Split the short and long flag out of something like '-m,--mixed <value>'

Callers 1

attributeNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected