@kinda/utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@kinda/utils

自己封装好了的一些前端方法库

to

省去了在使用await时每次都需要进行包装try...catch的操作

const a = async (params: number) => {
    return new Promise((resolve,reject) => {
        if (params == 1) {
            resolve(1)
        } else {
            reject(2)
        }
    })
}
const [ res, err ] = await to(a(1))
console.log(res, err)

Readme

Keywords

Package Sidebar

Install

npm i @kinda/utils

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

190 kB

Total Files

11

Last publish

Collaborators

  • alnda