💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
```js export function deepCopy (data) { const type = typeOf(data) let obj if (type === 'array') { obj = [] } else if (type === 'object') { obj = {} } else { return data } if (type === 'array') { for (let i = 0; i < data.length; i++) { obj.push(deepCopy(data[i])) } } else if (type === 'object') { for (const i in data) { obj[i] = deepCopy(data[i]) } } return obj } ```