index.js
function formatName(input, noCamelCase){
	input = input.replace(/^-+/, "");
	
	// Convert kebab-case to camelCase
	if(!noCamelCase && /-/.test(input))
		input = input.toLowerCase().replace(/([a-z])-+([a-z])/g, (_, a, b) => a + b.toUpperCase());
	
	return input;
}
function formatName(input, noCamelCase){
	input = input.replace(/^-+/, "");
	
	// Convert kebab-case to camelCase
	if(!noCamelCase && /-/.test(input))
		input = input.toLowerCase().replace(/([a-z])-+([a-z])/g, (_, a, b) => a + b.toUpperCase());
	
	return input;
}
function formatName ( input , noCamelCase ) { input = input . replace ( / ^-+ / , "" ) ; // Convert kebab-case to camelCase if ( ! noCamelCase && / - / . test ( input ) ) input = input . toLowerCase ( ) . replace ( / ([a-z])-+([a-z]) / g , ( _ , a , b ) => a + b . toUpperCase ( ) ) ; return input ; }
Strip leading dashes from an option name and convert it to camelCase.

@param {String} input - An option's name, such as "--write-to"
@param {Boolean} noCamelCase - Strip leading dashes only
@return {String}
@internal
Strip leading dashes from an option name and convert it to camelCase .