code: function dataSet( element ) {
    if ( document.documentElement.dataset ) {
      return _assign( {}, element.dataset );
    }
    const dataset = {};
    const regex = /^data-(.+)/;
    let attr;
    let match;
  
    for ( var i = 0; i < element.attributes.length; i++ ) {
      attr = element.attributes[i];
      match = attr.name.match( regex );
      if ( match ) {
        dataset[_toCamelCase( match[1] )] = attr.value;
      }
    }
  
    return dataset;
  }
docs: Get dataset from DOM element.
  Contains code copied from
  https://github.com/remy/polyfills/blob/master/dataset.js.
  @param {HTMLElement} element - The element to check for dataset support.
  @returns {Object} The data set.