src/AttributeMarshallingMixin.js
function attributeToPropertyName(attributeName) {
  let propertyName = attributeToPropertyNames[attributeName];
  if (!propertyName) {
    // Convert and memoize.
    const hyphenRegEx = /-([a-z])/g;
    propertyName = attributeName.replace(hyphenRegEx,
        match => match[1].toUpperCase());
    attributeToPropertyNames[attributeName] = propertyName;
  }
  return propertyName;
}
function attributeToPropertyName(attributeName) {
  let propertyName = attributeToPropertyNames[attributeName];
  if (!propertyName) {
    // Convert and memoize.
    const hyphenRegEx = /-([a-z])/g;
    propertyName = attributeName.replace(hyphenRegEx,
        match => match[1].toUpperCase());
    attributeToPropertyNames[attributeName] = propertyName;
  }
  return propertyName;
}
function attributeToPropertyName ( attributeName ) { let propertyName = attributeToPropertyNames [ attributeName ] ; if ( ! propertyName ) { // Convert and memoize. const hyphenRegEx = / -([a-z]) / g ; propertyName = attributeName . replace ( hyphenRegEx , match => match [ 1 ] . toUpperCase ( ) ) ; attributeToPropertyNames [ attributeName ] = propertyName ; } return propertyName ; }
Convert hyphenated foo-bar attribute name to camel case fooBar property name.
Convert hyphenated foo - bar attribute name to camel case fooBar property name .