@aomex/internal-tools 1.0.3 → 1.1.0
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/CHANGELOG.md +6 -8
- package/README.md +0 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
# 1.1.0 (2024-06-27)
|
|
6
7
|
|
|
7
|
-
## 1.0.1
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Features
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- [`11103a2`](https://github.com/aomex/aomex/commit/11103a2aff4e081754c56b0ff18fa5130ca252e8) Thanks [@geekact](https://github.com/geekact)! - 重新制作
|
|
11
|
+
* 初始化 ([3350159](https://github.com/aomex/aomex/commit/3350159454ad230e6d910405f907293b059b1f49))
|
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,11 +9,9 @@ var sleep = (durationMS) => durationMS <= 0 ? Promise.resolve(void 0) : new Prom
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
// src/index.ts
|
|
12
|
-
import { default as default2 } from "
|
|
13
|
-
import { default as default3 } from "bytes";
|
|
12
|
+
import { default as default2 } from "bytes";
|
|
14
13
|
export {
|
|
15
|
-
|
|
16
|
-
default2 as chalk,
|
|
14
|
+
default2 as bytes,
|
|
17
15
|
sleep,
|
|
18
16
|
toArray
|
|
19
17
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/to-array.ts","../src/sleep.ts","../src/index.ts"],"sourcesContent":["/**\n * 返回数组,如果传入非数组,则会包装成只有一个元素的数组\n * @param data 非数组或者数组\n * @param unique 是否需要去重。默认:`false`\n */\nexport function toArray<T>(data: T | readonly T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique: boolean = false): T[] {\n return Array.isArray(data) ? (unique ? [...new Set(data)] : data) : [data];\n}\n","/**\n * 等待指定的时间(毫秒)后再往下执行\n */\nexport const sleep = (durationMS: number): Promise<void> =>\n durationMS <= 0\n ? Promise.resolve(void 0)\n : new Promise((resolve) => {\n setTimeout(resolve, durationMS);\n });\n","export * from './to-array';\nexport * from './sleep';\nexport * from './type';\nexport { default as
|
|
1
|
+
{"version":3,"sources":["../src/to-array.ts","../src/sleep.ts","../src/index.ts"],"sourcesContent":["/**\n * 返回数组,如果传入非数组,则会包装成只有一个元素的数组\n * @param data 非数组或者数组\n * @param unique 是否需要去重。默认:`false`\n */\nexport function toArray<T>(data: T | readonly T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique: boolean = false): T[] {\n return Array.isArray(data) ? (unique ? [...new Set(data)] : data) : [data];\n}\n","/**\n * 等待指定的时间(毫秒)后再往下执行\n */\nexport const sleep = (durationMS: number): Promise<void> =>\n durationMS <= 0\n ? Promise.resolve(void 0)\n : new Promise((resolve) => {\n setTimeout(resolve, durationMS);\n });\n","export * from './to-array';\nexport * from './sleep';\nexport * from './type';\nexport { default as bytes } from 'bytes';\n"],"mappings":";AAOO,SAAS,QAAW,MAAe,SAAkB,OAAY;AACtE,SAAO,MAAM,QAAQ,IAAI,IAAK,SAAS,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,OAAQ,CAAC,IAAI;AAC3E;;;ACNO,IAAM,QAAQ,CAAC,eACpB,cAAc,IACV,QAAQ,QAAQ,MAAM,IACtB,IAAI,QAAQ,CAAC,YAAY;AACvB,aAAW,SAAS,UAAU;AAChC,CAAC;;;ACLP,SAAoB,WAAXA,gBAAwB;","names":["default"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/internal-tools",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "aomex内部实用工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@types/bytes": "^3.1.4",
|
|
29
|
-
"bytes": "^3.1.2"
|
|
30
|
-
"chalk": "^5.3.0"
|
|
29
|
+
"bytes": "^3.1.2"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {}
|
|
33
32
|
}
|