hsu-utils 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +32 -32
- package/dist/hsu-utils.js +13 -2
- package/dist/hsu-utils.min.js +1 -1
- package/dist/hsu-utils.min.js.LICENSE.txt +1 -1
- package/es/ArrayIsIncludes/index.d.ts +1 -0
- package/es/ArrayIsIncludes/index.js +8 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/lib/ArrayIsIncludes/index.d.ts +1 -0
- package/lib/ArrayIsIncludes/index.js +11 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/package.json +59 -59
package/README.md
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
# [Hsu Utils](https://github.com/VitaTsui/hsu-utils#hsu-utils)
|
2
|
-
|
3
|
-
## 前言
|
4
|
-
|
5
|
-
`hsu-utils` 一些前端的工具集
|
6
|
-
|
7
|
-
## 安装
|
8
|
-
|
9
|
-
```sh
|
10
|
-
npm install --save hsu-utils
|
11
|
-
# 或
|
12
|
-
yarn add hsu-utils
|
13
|
-
```
|
14
|
-
|
15
|
-
## 功能
|
16
|
-
|
17
|
-
- `console_table` 在控制台打印像 MySql 一样的表格
|
18
|
-
- `deepCopy` 深拷贝
|
19
|
-
- `Equal`
|
20
|
-
|
21
|
-
> `ValEqual` 判断值相等,`TypeEqual` 判断类型相同,`ObjEqual` 判断对象相等
|
22
|
-
|
23
|
-
- `Typeof` 获取类型或判断类型
|
24
|
-
|
25
|
-
> string、number、boolean、undefined、function、symbol、bigint、object、array、null、date、formdata、set、map、regexp、arraybuffer、blob
|
26
|
-
|
27
|
-
- `get_string_width` 获取字符串长度
|
28
|
-
> 根据字体属性进行计算,默认 size 为 12,family 为 微软雅黑
|
29
|
-
- `loadImage` 异步加载图片
|
30
|
-
> 确保相同的图片只加载一次
|
31
|
-
- `renderPDF` 渲染 PDF
|
32
|
-
- `downloadFile` 下载文件
|
1
|
+
# [Hsu Utils](https://github.com/VitaTsui/hsu-utils#hsu-utils)
|
2
|
+
|
3
|
+
## 前言
|
4
|
+
|
5
|
+
`hsu-utils` 一些前端的工具集
|
6
|
+
|
7
|
+
## 安装
|
8
|
+
|
9
|
+
```sh
|
10
|
+
npm install --save hsu-utils
|
11
|
+
# 或
|
12
|
+
yarn add hsu-utils
|
13
|
+
```
|
14
|
+
|
15
|
+
## 功能
|
16
|
+
|
17
|
+
- `console_table` 在控制台打印像 MySql 一样的表格
|
18
|
+
- `deepCopy` 深拷贝
|
19
|
+
- `Equal`
|
20
|
+
|
21
|
+
> `ValEqual` 判断值相等,`TypeEqual` 判断类型相同,`ObjEqual` 判断对象相等
|
22
|
+
|
23
|
+
- `Typeof` 获取类型或判断类型
|
24
|
+
|
25
|
+
> string、number、boolean、undefined、function、symbol、bigint、object、array、null、date、formdata、set、map、regexp、arraybuffer、blob
|
26
|
+
|
27
|
+
- `get_string_width` 获取字符串长度
|
28
|
+
> 根据字体属性进行计算,默认 size 为 12,family 为 微软雅黑
|
29
|
+
- `loadImage` 异步加载图片
|
30
|
+
> 确保相同的图片只加载一次
|
31
|
+
- `renderPDF` 渲染 PDF
|
32
|
+
- `downloadFile` 下载文件
|
package/dist/hsu-utils.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
*
|
3
|
-
* hsu-utils v0.0.
|
3
|
+
* hsu-utils v0.0.15
|
4
4
|
*
|
5
5
|
* some front-end utils
|
6
6
|
*
|
@@ -58,6 +58,17 @@ eval("/**\n * @licstart The following is the entire license notice for the\n * J
|
|
58
58
|
|
59
59
|
/***/ }),
|
60
60
|
|
61
|
+
/***/ "./tools/ArrayIsIncludes/index.ts":
|
62
|
+
/*!****************************************!*\
|
63
|
+
!*** ./tools/ArrayIsIncludes/index.ts ***!
|
64
|
+
\****************************************/
|
65
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
66
|
+
|
67
|
+
"use strict";
|
68
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar __1 = __webpack_require__(/*! .. */ \"./tools/index.ts\");\nfunction array_is_includes(arr1, arr2) {\n var largeArr = arr1.length >= arr2.length ? arr1 : arr2;\n var smallArr = arr1.length < arr2.length ? arr1 : arr2;\n return smallArr.every(function (item) {\n return !!largeArr.find(function (i) { return __1.Equal.ValEqual(item, i); });\n });\n}\nexports[\"default\"] = array_is_includes;\n\n\n//# sourceURL=webpack://hsu-utils/./tools/ArrayIsIncludes/index.ts?");
|
69
|
+
|
70
|
+
/***/ }),
|
71
|
+
|
61
72
|
/***/ "./tools/ConsoleTable/index.ts":
|
62
73
|
/*!*************************************!*\
|
63
74
|
!*** ./tools/ConsoleTable/index.ts ***!
|
@@ -164,7 +175,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nfunc
|
|
164
175
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
165
176
|
|
166
177
|
"use strict";
|
167
|
-
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.downloadFile = exports.renderPDF = exports.loadImage = exports.ConvertNumbers = exports.get_string_width = exports.Typeof = exports.Equal = exports.deepCopy = exports.console_table = void 0;\nvar ConsoleTable_1 = __importDefault(__webpack_require__(/*! ./ConsoleTable */ \"./tools/ConsoleTable/index.ts\"));\nexports.console_table = ConsoleTable_1.default;\nvar DeepCopy_1 = __importDefault(__webpack_require__(/*! ./DeepCopy */ \"./tools/DeepCopy/index.ts\"));\nexports.deepCopy = DeepCopy_1.default;\nvar Equal_1 = __importDefault(__webpack_require__(/*! ./Equal */ \"./tools/Equal/index.ts\"));\nexports.Equal = Equal_1.default;\nvar Typeof_1 = __importDefault(__webpack_require__(/*! ./Typeof */ \"./tools/Typeof/index.ts\"));\nexports.Typeof = Typeof_1.default;\nvar GetStrWidth_1 = __importDefault(__webpack_require__(/*! ./GetStrWidth */ \"./tools/GetStrWidth/index.ts\"));\nexports.get_string_width = GetStrWidth_1.default;\nvar ConvertNumbers_1 = __importDefault(__webpack_require__(/*! ./ConvertNumbers */ \"./tools/ConvertNumbers/index.ts\"));\nexports.ConvertNumbers = ConvertNumbers_1.default;\nvar LoadImage_1 = __importDefault(__webpack_require__(/*! ./LoadImage */ \"./tools/LoadImage/index.ts\"));\nexports.loadImage = LoadImage_1.default;\nvar RenderPDF_1 = __importDefault(__webpack_require__(/*! ./RenderPDF */ \"./tools/RenderPDF/index.ts\"));\nexports.renderPDF = RenderPDF_1.default;\nvar DownloadFile_1 = __importDefault(__webpack_require__(/*! ./DownloadFile */ \"./tools/DownloadFile/index.ts\"));\nexports.downloadFile = DownloadFile_1.default;\n\n\n//# sourceURL=webpack://hsu-utils/./tools/index.ts?");
|
178
|
+
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.array_is_includes = exports.downloadFile = exports.renderPDF = exports.loadImage = exports.ConvertNumbers = exports.get_string_width = exports.Typeof = exports.Equal = exports.deepCopy = exports.console_table = void 0;\nvar ConsoleTable_1 = __importDefault(__webpack_require__(/*! ./ConsoleTable */ \"./tools/ConsoleTable/index.ts\"));\nexports.console_table = ConsoleTable_1.default;\nvar DeepCopy_1 = __importDefault(__webpack_require__(/*! ./DeepCopy */ \"./tools/DeepCopy/index.ts\"));\nexports.deepCopy = DeepCopy_1.default;\nvar Equal_1 = __importDefault(__webpack_require__(/*! ./Equal */ \"./tools/Equal/index.ts\"));\nexports.Equal = Equal_1.default;\nvar Typeof_1 = __importDefault(__webpack_require__(/*! ./Typeof */ \"./tools/Typeof/index.ts\"));\nexports.Typeof = Typeof_1.default;\nvar GetStrWidth_1 = __importDefault(__webpack_require__(/*! ./GetStrWidth */ \"./tools/GetStrWidth/index.ts\"));\nexports.get_string_width = GetStrWidth_1.default;\nvar ConvertNumbers_1 = __importDefault(__webpack_require__(/*! ./ConvertNumbers */ \"./tools/ConvertNumbers/index.ts\"));\nexports.ConvertNumbers = ConvertNumbers_1.default;\nvar LoadImage_1 = __importDefault(__webpack_require__(/*! ./LoadImage */ \"./tools/LoadImage/index.ts\"));\nexports.loadImage = LoadImage_1.default;\nvar RenderPDF_1 = __importDefault(__webpack_require__(/*! ./RenderPDF */ \"./tools/RenderPDF/index.ts\"));\nexports.renderPDF = RenderPDF_1.default;\nvar DownloadFile_1 = __importDefault(__webpack_require__(/*! ./DownloadFile */ \"./tools/DownloadFile/index.ts\"));\nexports.downloadFile = DownloadFile_1.default;\nvar ArrayIsIncludes_1 = __importDefault(__webpack_require__(/*! ./ArrayIsIncludes */ \"./tools/ArrayIsIncludes/index.ts\"));\nexports.array_is_includes = ArrayIsIncludes_1.default;\n\n\n//# sourceURL=webpack://hsu-utils/./tools/index.ts?");
|
168
179
|
|
169
180
|
/***/ }),
|
170
181
|
|