Vitarx shared utilities
npm install @vitarx/utilsVitarx 共享工具库,提供常用工具函数和类型定义。
``bash`
npm install @vitarx/utils
`javascript
import { deepClone, isObject, sleep } from '@vitarx/utils';
// 深拷贝示例
const obj = { a: 1, b: { c: 2 } };
const cloned = deepClone(obj);
// 类型检测示例
console.log(isObject({})); // true
// 延迟函数示例
await sleep(1000); // 延迟1秒
``