common-utils-kit 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
##
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# 配置为npm源
|
|
7
|
-
npm config set registry https://registry.npmjs.org/
|
|
8
|
-
#登录npm账号
|
|
9
|
-
npm adduser
|
|
10
|
-
例:如果报错为request to https://registry.npmjs.org/-/v1/login failed, reason: connect ETIMEDOUT 104.16.0.35:443
|
|
11
|
-
切换为:npm config set registry https://registry.npmmirror.com/后
|
|
12
|
-
再次切换到:npm config set registry https://registry.npmjs.org/
|
|
13
|
-
参考于:https://www.cnblogs.com/oldCode/p/learnjts.html
|
|
14
|
-
```
|
|
2
|
+
## Common Utils Kit
|
|
3
|
+
|
|
4
|
+
`common-utils-kit`是一个包含常用函数的npm包,提供了一系列验证、防抖节流、数据格式化等功能
|
|
5
|
+
|
|
15
6
|
## 使用
|
|
16
7
|
```
|
|
17
8
|
# 安装
|
|
18
9
|
npm i common-utils-kit
|
|
10
|
+
# 引入
|
|
11
|
+
import {test,format,tool} from "common-utils-kit/src/test";
|
|
12
|
+
# 使用
|
|
13
|
+
test //验证数据类型 例:test.number(1)
|
|
14
|
+
format // 格式化数据 例:
|
|
15
|
+
tool //工具函数
|
|
19
16
|
```
|
|
20
17
|
|