Convert a camel case fooBar property name to a hyphenated foo-bar attribute.
774188
function propertyNameToAttribute(propertyName) {
  let attribute = propertyNamesToAttributes[propertyName];
  if (!attribute) {
    // Convert and memoize.
    const uppercaseRegEx = /([A-Z])/g;
    attribute = propertyName.replace(uppercaseRegEx, '-$1').toLowerCase();
  }
  return attribute;
}
951012
def camel_case_to_name(name):
    
    def convert_func(val):
        return "_" + val.group(0).lower()
    return name[0].lower() + re.sub(r'([A-Z])', convert_func, name[1:])
454307
public static String convertPropertyName(String prop) {
        if (Character.isDigit(prop.charAt(0))) {
            return prop;
        }
        return BeanUtils.decapitalize(prop);
    }
1339387
def camelize(string)
      string
        .to_s
        .split('_')
        .map { |e| e.capitalize }
        .join
    end
398988
def camelcase_to_spaces(content):
    
    camelcase_boundry = '(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))'
    content = re.sub(camelcase_boundry, ' \\1', content).strip()
    return ' '.join(content.split('_')).title()
836386
function transformPropertiesToCamelCase (object) {
  var output = {}

  for (var _key in object) {
    if (typeof object === 'string') { return object.replace(' !important', '') }
    var key = _key
    var value = object[_key]
    if (~key.indexOf('-')) {
      var splittedKeys = key.split('-')
      splittedKeys = splittedKeys.map(function (v, i) {
        return i > 0
        // UCFIRST if ! first element
        ? v.charAt(0).toUpperCase() + v.substr(1) : v
      })
      key = splittedKeys.join('')
    }
    output[key] = transformPropertiesToCamelCase(value)
  }
  return output
}
823225
public static String toUnderscore(String name) {
		return CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
	}
1213557
def convert_camel_case_to_snake_case(name):
    """"""
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
1206329
def camelify(self):
        """"""
        outstring = self.titleify(allwords=True)
        outstring = re.sub(r"&[^;]+;", " ", outstring)
        outstring = re.sub(r"\W+", "", outstring)
        return String(outstring)
278623
def camelize(name)
      words = name.split('_')
      first_word = words.shift
      
      words.each do |word|
        word.sub!(/^[a-z]/, &:upcase)
      end
      
      words.unshift(first_word).join
    end
973023
def snake_case_to_camel_case(value)
      pieces = value.to_s.split '_'

      (pieces.first + pieces[1..-1].map(&:capitalize).join).to_sym
    end
90893
public static String underscoreSeparated(String camelCaseName) {
        return StringUtils.lowerCase(
                Arrays.stream(StringUtils.split(camelCaseName, SubFacet.SEPARATOR))
                        .flatMap(component -> Arrays.stream(StringUtils.splitByCharacterTypeCamelCase(component)))
                        .collect(Collectors.joining("_")));
    }
74469
function camelCase(str, next) {
    let output = '';
    for (const c of str) {
        if (c === '_') {
            next = true;
            continue;
        }
        output += next ? c.toUpperCase() : c;
        next = false;
    }
    return output;
}
638109
def camel_to_snake_case(string):
    
    s = _1.sub(r'\1_\2', string)
    return _2.sub(r'\1_\2', s).lower()
999966
function prefixProperty (property) {
  property = property.replace(camelReg, (match, first, char) => (first ? char : char.toUpperCase()))

  if (prefixCache[property]) {
    return prefixCache[property]
  }

  let prop

  if (!(property in supportElement.style)) {
    for (let i = 0; i < PREFIX_TYPE.length; i++) {
      let prefixedProp = PREFIX_TYPE[i] +
        property.charAt(0).toUpperCase() +
        property.slice(1)
      if (prefixedProp in supportElement.style) {
        prop = prefixedProp
        break
      }
    }
  }

  prefixCache[property] = prop || property

  return prefixCache[property]
}
889218
def camel_case_from_underscores(string):
    """"""

    components = string.split('_')
    string = ''

    for component in components:
        if component in abbreviations:
            string += component
        else:
            string += component[0].upper() + component[1:].lower()

    return string
1240383
public static String toCamelCase(final String propName) {
        String newPropName = camelCasePropNamePool.get(propName);

        if (newPropName == null) {
            newPropName = StringUtil.toCamelCase(propName);
            newPropName = NameUtil.getCachedName(newPropName);
            camelCasePropNamePool.put(propName, newPropName);
        }

        return newPropName;
    }