var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

export default function fmtEvent(props, e) {
  var dataset = {};
  for (var key in props) {
    if (/data-/gi.test(key)) {
      dataset[key.replace(/data-/gi, '')] = props[key];
    }
  }
  return _extends({}, e, {
    currentTarget: { dataset: dataset },
    target: { dataset: dataset, targetDataset: dataset }
  });
}