informed
Version:
A lightweight framework and utility for building powerful forms in React applications
13 lines (9 loc) • 545 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
// fallback for browsers that don't support `structuredClone` yet
// this comes with some limitations in what can be cloned, but this should be fine for most use cases
// `structuredClone` can also be polyfilled using https://www.npmjs.com/package/@ungap/structured-clone
var structuredCloneShim = typeof structuredClone === 'function' ? structuredClone : function (obj) {
return JSON.parse(JSON.stringify(obj));
};
exports.structuredClone = structuredCloneShim;