UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

2 lines (1 loc) 577 B
import{a as y}from"./chunk-WIMGWYZL.js";function d(...n){return y(u,n)}function u(n,o=[],t=[]){if(typeof n=="function")return n;if(typeof n!="object"||n===null)return structuredClone(n);let r=Object.getPrototypeOf(n);if(!Array.isArray(n)&&r!==null&&r!==Object.prototype)return structuredClone(n);let e=o.indexOf(n);return e!==-1?t[e]:(o.push(n),Array.isArray(n)?p(n,o,t):i(n,o,t))}function i(n,o,t){let r={};t.push(r);for(let[e,c]of Object.entries(n))r[e]=u(c,o,t);return r}function p(n,o,t){let r=[];t.push(r);for(let[e,c]of n.entries())r[e]=u(c,o,t);return r}export{d as a};