1.0.10 • Published 19 days ago

dm-kit v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
19 days ago

前端工具库

这个公共库包含与具体项目UI无关的代码。

安装与使用

  1. 引入库
npm install -S dm-kit
  1. 在代码中使用
import { isValidMobile } from 'dm-kit';
if (isValidMobile(mobile)) {
  //...
}

//or

import { isValidMobile } from 'dmKit/validators';
if (isValidMobile(mobile)) {
  //...
}

更新

当这个公共库有更新时,只需执行

npm update dm-kit

就可以了。

贡献代码

这个库的源码采用 typescript 编写,在 src 目录下。

  1. 安装依赖
cd /YOUR_PROJECTS_FOLDER/dmKit
npm install
  1. 更改 src 下的代码,推荐使用 Visual Studio Code 编辑器。

  2. 执行代码编译,然后提交

npm run build
git add .
git commit -m "<commit message>"
git push origin

功能列表

查看doc目录下的文档

单元测试

使用 jest 作为单元测试的工具 官方文档。该项目大部分使用jest断言的功能,如果想了解更多常用的其他功能可以参考

  • jest.config.ts 配置文件
  • test/*.(test|spec).js 编写的测试代码

更多测试用例写法参考lodash写法

1.0.10

19 days ago

1.0.9

25 days ago

1.0.8

25 days ago

1.0.7

26 days ago

1.0.6

27 days ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

5 months ago

1.0.1-1

6 months ago

1.0.1

6 months ago

1.0.1-0

6 months ago

1.0.0

6 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

10 months ago

0.1.0

10 months ago