index.js 215 B

123456789
  1. const transformOn = (obj) => {
  2. const result = {};
  3. Object.keys(obj).forEach((evt) => {
  4. result[`on${evt[0].toUpperCase()}${evt.substr(1)}`] = obj[evt];
  5. });
  6. return result;
  7. };
  8. module.exports = transformOn;