packages/travix-ui-kit/components/_helpers.js
function getDataAttributes(attributes) {
  if (!attributes) {
    return {};
  }

  return Object.keys(attributes).reduce((ret, key) => {
    ret[`data-${key.toLowerCase()}`] = attributes[key];
    return ret;
  }, {});
}
function getDataAttributes(attributes) {
  if (!attributes) {
    return {};
  }

  return Object.keys(attributes).reduce((ret, key) => {
    ret[`data-${key.toLowerCase()}`] = attributes[key];
    return ret;
  }, {});
}
function getDataAttributes ( attributes ) { if ( ! attributes ) { return { } ; } return Object . keys ( attributes ) . reduce ( ( ret , key ) => { ret [ ` ${ key . toLowerCase ( ) } ` ] = attributes [ key ] ; return ret ; } , { } ) ; }
Creates an object of data-attributes based on another given attributes' object.

@param {Object} attributes Attributes to be added to a component as a data-*
@return {Object}           Returns an object with the attributes properly prefixed with 'data-'
Creates an object of data - attributes based on another given attributes object .