UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

1 lines 641 B
const e=require(`./purry-CxXxOfsx.cjs`);function t(...t){return e.purry(n,t)}function n(e,t=[],n=[]){if(typeof e==`function`)return e;if(typeof e!=`object`||!e)return structuredClone(e);let a=Object.getPrototypeOf(e);if(!Array.isArray(e)&&a!==null&&a!==Object.prototype)return structuredClone(e);let o=t.indexOf(e);return o===-1?(t.push(e),Array.isArray(e)?i(e,t,n):r(e,t,n)):n[o]}function r(e,t,r){let i={};r.push(i);for(let[a,o]of Object.entries(e))i[a]=n(o,t,r);return i}function i(e,t,r){let i=[];r.push(i);for(let[a,o]of e.entries())i[a]=n(o,t,r);return i}Object.defineProperty(exports,`clone`,{enumerable:!0,get:function(){return t}});