src/AttributeMarshallingMixin.js
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;
}
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;
}
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 ; }
Convert a camel case fooBar property name to a hyphenated foo-bar attribute.
Convert a camel case fooBar property name to a hyphenated foo - bar attribute .