UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

23 lines 708 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cloneEvent = void 0; const cloneEvent = (e) => { if (e === undefined || e === null) return undefined; // eslint-disable-next-line @typescript-eslint/no-empty-function function SyntheticEvent() { } const clone = new SyntheticEvent(); for (const p in e) { const d = Object.getOwnPropertyDescriptor(e, p); if (d && (d.get || d.set)) { Object.defineProperty(clone, p, d); } else { clone[p] = e[p]; } } Object.setPrototypeOf(clone, e); return clone; }; exports.cloneEvent = cloneEvent; //# sourceMappingURL=cloneEvent.js.map