src/common/html-attributes/index.js
function processHtmlAttributes(input = {}) {
    const attributes = {};
    const htmlAttributes = input.htmlAttributes;
    const wildcardAttributes = input['*'];

    let obj = htmlAttributes || wildcardAttributes;
    if (htmlAttributes && wildcardAttributes) {
        obj = Object.assign(wildcardAttributes, htmlAttributes);
    }

    if (obj) {
        Object.keys(obj).forEach((key) => {
            attributes[camelToKebab(key)] = obj[key];
        });
    }

    return attributes;
}
function processHtmlAttributes(input = {}) {
    const attributes = {};
    const htmlAttributes = input.htmlAttributes;
    const wildcardAttributes = input['*'];

    let obj = htmlAttributes || wildcardAttributes;
    if (htmlAttributes && wildcardAttributes) {
        obj = Object.assign(wildcardAttributes, htmlAttributes);
    }

    if (obj) {
        Object.keys(obj).forEach((key) => {
            attributes[camelToKebab(key)] = obj[key];
        });
    }

    return attributes;
}
function processHtmlAttributes ( input = { } ) { const attributes = { } ; const htmlAttributes = input . htmlAttributes ; const wildcardAttributes = input [ '*' ] ; let obj = htmlAttributes || wildcardAttributes ; if ( htmlAttributes && wildcardAttributes ) { obj = Object . assign ( wildcardAttributes , htmlAttributes ) ; } if ( obj ) { Object . keys ( obj ) . forEach ( ( key ) => { attributes [ camelToKebab ( key ) ] = obj [ key ] ; } ) ; } return attributes ; }
Create object of HTML attributes for pass-through to the DOM
@param {Object} input
Create object of HTML attributes for pass - through to the DOM