utils-lib-js-lite 1.0.0 → 1.0.1
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.en.md +4 -4
- package/README.md +1 -1
- package/package.json +44 -44
package/README.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
JavaScript utility functions, packaging some commonly used js functions
|
|
5
|
+
JavaScript utility functions, packaging some commonly used js functions, lightweight toolkit
|
|
6
6
|
|
|
7
7
|
## Debugging instructions
|
|
8
8
|
|
|
@@ -354,9 +354,9 @@ Determines if the object is empty
|
|
|
354
354
|
- `object` : the target object.
|
|
355
355
|
|
|
356
356
|
```javascript
|
|
357
|
-
const o = isEmptyObject({name: "a u"});
|
|
357
|
+
const o = isEmptyObject({ name: "a u" });
|
|
358
358
|
const o2 = isEmptyObject({});
|
|
359
|
-
console.log(o, o2);
|
|
359
|
+
console.log(o, o2); // Output: false true
|
|
360
360
|
```
|
|
361
361
|
|
|
362
362
|
#### array module
|
|
@@ -372,7 +372,7 @@ const originalArray = [1, 2, 3, 4, 5];
|
|
|
372
372
|
const randomizedArray = arrayRandom(originalArray);
|
|
373
373
|
console.log(randomizedArray);
|
|
374
374
|
// Output: a randomly sorted array
|
|
375
|
-
|
|
375
|
+
```
|
|
376
376
|
|
|
377
377
|
##### 2. `arrayUniq(arr: any[]): any[]`
|
|
378
378
|
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "utils-lib-js-lite",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "JavaScript工具函数,封装的一些常用的js函数,轻量化工具包",
|
|
5
|
-
"main": "./dist/cjs/index.js",
|
|
6
|
-
"types": "./dist/cjs/index.d.ts",
|
|
7
|
-
"module": "./dist/esm/index.js",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"exports": {
|
|
10
|
-
"import": "./dist/esm/index.js",
|
|
11
|
-
"require": "./dist/cjs/index.js"
|
|
12
|
-
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "utils-lib-js-lite",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "JavaScript工具函数,封装的一些常用的js函数,轻量化工具包",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"types": "./dist/cjs/index.d.ts",
|
|
7
|
+
"module": "./dist/esm/index.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": "./dist/esm/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://gitee.com/DieHunter/utils-lib-js.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"utils",
|
|
19
|
+
"tools",
|
|
20
|
+
"lib"
|
|
21
|
+
],
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@rollup/plugin-alias": "^4.0.3",
|
|
26
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
27
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
28
|
+
"@types/node": "^18.7.15",
|
|
29
|
+
"rollup": "^3.20.2",
|
|
30
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
31
|
+
"tslib": "^2.5.0",
|
|
32
|
+
"typescript": "^4.9.0"
|
|
33
|
+
},
|
|
34
|
+
"umdModuleName": "UtilsLib",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"debug": "start cmd /k pnpm run build:hot & pnpm run node:hot",
|
|
37
|
+
"node:hot": "nodemon example.js --watch example.js",
|
|
38
|
+
"build:hot": "pnpm rollup -c --watch",
|
|
39
|
+
"build": "pnpm run rollup:build && pnpm run commonjs",
|
|
40
|
+
"rollup:build": "rm -fr dist && pnpm rollup -c",
|
|
41
|
+
"build:publish": "pnpm run build && pnpm publish",
|
|
42
|
+
"commonjs": "cp ./commonjs.json dist/cjs/package.json"
|
|
43
|
+
}
|
|
44
|
+
}
|