Skip to content

uxiuWeb 后端基础工具库

本文档由大模型辅助生成, 可能会与实际使用有细微差异, 实际使用请参考具体方法的文档注释

uxiu

安装 ​

bash
pnpm add uxiu

Node/Koa 模块按需安装 peer 依赖:

bash
pnpm add koa @koa/router pino path-to-regexp
ts
import { safe } from 'uxiu/utils'
import { random } from 'uxiu/dependence'

const [error, result] = await safe(async () => {
	return random(1000, 9999)
})

基于 MIT 许可发布