open-consul/ui-v2/app/utils/dom/normalize-event.js
John Cowen 52a62f2b8d UI: New ACLs (#4789)
UI to accompany the new ACLs APIs
2018-10-19 08:45:05 -07:00

9 lines
183 B
JavaScript

export default function(e, value, target = {}) {
if (typeof e.target !== 'undefined') {
return e;
}
return {
target: { ...target, ...{ name: e, value: value } },
};
}