@weapp-core/shared
npm install @weapp-core/shared@weapp-core/shared 汇总 weapp-vite 生态内的通用工具函数与依赖封装,供多个包复用。
- 常用字符串与路径处理工具
- 对象合并与判定工具
- 统一导出常用第三方工具(defu、get、set、object-hash)
``bash`
pnpm add @weapp-core/shared
`ts
import {
addExtension,
defu,
escapeStringRegexp,
objectHash,
removeExtension,
} from '@weapp-core/shared'
const name = addExtension('pages/index/index')
const cleaned = removeExtension('app.json')
const hash = objectHash({ foo: 'bar' })
``
暂无额外配置。
- 仓库:https://github.com/weapp-vite/weapp-vite