lib/utilities.js
function camelCase(string) {
  if (typeof string !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  // custom property or no hyphen found
  if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {
    return string;
  }

  // convert to camelCase
  return string
    .toLowerCase()
    .replace(hyphenPatternRegex, function(_, character) {
      return character.toUpperCase();
    });
}
function camelCase(string) {
  if (typeof string !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  // custom property or no hyphen found
  if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {
    return string;
  }

  // convert to camelCase
  return string
    .toLowerCase()
    .replace(hyphenPatternRegex, function(_, character) {
      return character.toUpperCase();
    });
}
function camelCase ( string ) { if ( typeof string !== 'string' ) { throw new TypeError ( 'First argument must be a string' ) ; } // custom property or no hyphen found if ( CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX . test ( string ) ) { return string ; } // convert to camelCase return string . toLowerCase ( ) . replace ( hyphenPatternRegex , function ( _ , character ) { return character . toUpperCase ( ) ; } ) ; }
Converts a string to camelCase.

@param  {String} string - The string.
@return {String}
Converts a string to camelCase .