packages/plugins/data/dist/DataDecorator.js
function convertPropertyKeyToDataAttributeKey(propertyKey) {
    if (propertyKey.substr(0, 1) === "_") {
        propertyKey = propertyKey.substr(1);
    }
    if (propertyKey.substr(0, 4) !== "data") {
        throw new Error(propertyKey + "\" has an invalid format please use @data dataSomeProp (data-some-prop) for valid bindings.");
    }
    return propertyKey.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase();
}
function convertPropertyKeyToDataAttributeKey(propertyKey) {
    if (propertyKey.substr(0, 1) === "_") {
        propertyKey = propertyKey.substr(1);
    }
    if (propertyKey.substr(0, 4) !== "data") {
        throw new Error(propertyKey + "\" has an invalid format please use @data dataSomeProp (data-some-prop) for valid bindings.");
    }
    return propertyKey.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase();
}
function convertPropertyKeyToDataAttributeKey ( propertyKey ) { if ( propertyKey . substr ( 0 , 1 ) === "_" ) { propertyKey = propertyKey . substr ( 1 ) ; } if ( propertyKey . substr ( 0 , 4 ) !== "data" ) { throw new Error ( propertyKey + "\" has an invalid format please use @data dataSomeProp (data-some-prop) for valid bindings." ) ; } return propertyKey . replace ( / ([a-zA-Z])(?=[A-Z]) / g , "$1-" ) . toLowerCase ( ) ; }
Will convert any possible property to a valid data attribute
@param {string} propertyKey    the prop to convert
Will convert any possible property to a valid data attribute