code: 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;
  }
docs: Convert a camel case fooBar property name to a hyphenated foo-bar attribute.