open-consul/ui/packages/consul-ui/app/utils/dom/normalize-event.js

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 } },
};
}