remeda
Version:
A utility library for JavaScript and Typescript.
2 lines (1 loc) • 626 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});var _chunkYC27MA32cjs = require('./chunk-YC27MA32.cjs');function p(...n){return _chunkYC27MA32cjs.a.call(void 0, u,n)}function u(n,t=[],r=[]){if(typeof n=="function")return n;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return structuredClone(n);let o=t.indexOf(n);return o!==-1?r[o]:(t.push(n),Array.isArray(n)?y(n,t,r):s(n,t,r))}function s(n,t,r){let o={};r.push(o);for(let[e,c]of Object.entries(n))o[e]=u(c,t,r);return o}function y(n,t,r){let o=[];r.push(o);for(let[e,c]of n.entries())o[e]=u(c,t,r);return o}exports.a = p;