# @gas0324/util

> util

Latest version **1.0.5** (published 2024-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gas0324/util
pnpm add @gas0324/util
yarn add @gas0324/util
bun add @gas0324/util
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2024-02-27 |
| First published | 2023-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Asd |
| Maintainers | gas0324 |
| Keywords | util, as-util, asUtil |

## Links

- npm: https://www.npmjs.com/package/@gas0324/util
- Repository: https://github.com/gas0324/util
- Homepage: https://github.com/gas0324/util#readme
- Issues: https://github.com/gas0324/util/issues
- npm.io page: https://npm.io/package/@gas0324/util

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2024-02-27
- 1.0.4 — 2024-02-27
- 1.0.3 — 2023-08-25
- 1.0.2 — 2023-06-30
- 1.0.1 — 2023-04-17
- 1.0.0 — 2023-04-04

## README

# util

> js工具函数


## 安装
```shell
npm install --save @gas0324/util
```

## FUNCTION

| 名称                   | 说明           | 参数                                                         |
| :----------:           | :------------: | :----------------------------------------------------------: |
| unlineToHump           | 下划线转驼峰   | str: string                                                  |
| humpToUnline           | 驼峰转下划线   | str: string                                                  |
| typeOf                 | 返回数据类型   | val: any                                                     |
| extname                | 获取文件扩展名 | fileName: string                                             |
| isEmpty                | 判断是否空值   | val: any                                                     |
| formatToTree           | 递归分组       | ary: any[], pid?: string/number, pField: string = 'parentId' |
| isPhone                | 判断是否手机号 | phone: string                                                |
| convertBytesToReadable | 字节单位转换   | bytes: number                                                |
| getDirectorySize       | 读取目录大小   | path: string                                                 |

---
_Source: https://npm.io/package/@gas0324/util · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
