dtable-utils
Version:
dtable common utils
74 lines (56 loc) • 2.05 kB
Markdown
<h1>dtable-utils</h1>
<div>
[](https://github.com/seafileltd/dtable-utils/actions/workflows/nodejs.yml)
[](https://www.npmjs.org/package/dtable-utils)
[](https://unpkg.com/dtable-utils@latest/dist/index.js)
</div>
common utils
## 项目结构
```bash
.
├── src
│ ├── archive # 归档视图相关工具函数
│ ├── cell-value-get # 数据格式化相关工具函数
│ ├── cell-value-set # 数据解析相关工具函数
│ ├── color # 颜色工具函数
│ ├── column # 列相关工具函数
│ ├── constants # 常量
│ ├── helper # 辅助工具。例如 number-precision
│ ├── filter # 过滤相关工具函数
│ ├── group # 分组相关工具函数
│ ├── sort # 排序相关工具函数
│ ├── link # Link 相关工具函数
│ ├── row # row 相关工具函数
│ ├── table # table 相关工具函数
│ ├── view # view 相关工具函数
│ ├── validate # 验证器。例如,过滤验证器
│ ├── common.js # 通用工具函数
│ ├── date.js # 日期工具函数
│ ├── number.js # 数字工具函数
│ ├── search.js # 搜索工具函数
│ └── index.js # 入口文件
├── tests # 单元测试
├── README.md
└── package.json
```
## 安装
npm 或 yarn 安装
```bash
# npm
$ npm install dtable-utils --save
# yarn
$ yarn add dtable-utils
```
## 使用
```js
import { CellType } from 'dtable-utils';
```
## 测试
### 常规测试
```bash
npm test
```
### 测试覆盖率
```bash
npm run test-cov
```