@andrewcaires/utils.js 0.3.4 → 0.3.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/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.esm.js +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +11 -11
package/dist/index.cjs.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @andrewcaires/utils.js v0.3.
|
|
2
|
+
* @andrewcaires/utils.js v0.3.5
|
|
3
3
|
* JavaScript utility library for web and nodejs development
|
|
4
4
|
* (c) 2024 Andrew Caires
|
|
5
5
|
* @license: MIT
|
|
@@ -16,7 +16,7 @@ declare const toArray: (value: any) => Array<any>;
|
|
|
16
16
|
|
|
17
17
|
declare const toBool: (value: string) => boolean;
|
|
18
18
|
|
|
19
|
-
declare const isArray: (test: any) => test is any
|
|
19
|
+
declare const isArray: (test: any) => test is Array<any>;
|
|
20
20
|
|
|
21
21
|
declare const isBoolean: (test: any) => test is boolean;
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ declare const isDef: (test: any) => test is any;
|
|
|
24
24
|
|
|
25
25
|
declare const isFloat: (test: any) => test is number;
|
|
26
26
|
|
|
27
|
-
type TypeCallbackFunction = (...args: Array<any>) =>
|
|
27
|
+
type TypeCallbackFunction<T = any> = (...args: Array<any>) => T;
|
|
28
28
|
type TypeArray<T> = Array<T>;
|
|
29
29
|
type TypeArrayAny = TypeArray<any>;
|
|
30
30
|
type TypeArrayString = TypeArray<string>;
|
|
@@ -32,8 +32,8 @@ type TypeArrayNumber = TypeArray<number>;
|
|
|
32
32
|
type TypeArrayFunction = TypeArray<TypeCallbackFunction>;
|
|
33
33
|
type TypeNullable<T> = T | null;
|
|
34
34
|
type TypeScalar = boolean | number | string;
|
|
35
|
-
type TypeObject<T> = {
|
|
36
|
-
[
|
|
35
|
+
type TypeObject<T, K extends keyof any = string> = {
|
|
36
|
+
[P in K]: T;
|
|
37
37
|
};
|
|
38
38
|
type TypeObjectAny = TypeObject<any>;
|
|
39
39
|
type TypeObjectBoolean = TypeObject<boolean>;
|
|
@@ -68,7 +68,7 @@ declare const isUndefined: (test: any) => test is undefined;
|
|
|
68
68
|
|
|
69
69
|
declare const type: (test: any) => string;
|
|
70
70
|
|
|
71
|
-
type CacheCallback = (key: any) =>
|
|
71
|
+
type CacheCallback = (key: any) => TypeObject<any, string | symbol>;
|
|
72
72
|
|
|
73
73
|
declare const cache: () => CacheCallback;
|
|
74
74
|
|
package/dist/index.esm.js
CHANGED
package/dist/index.min.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewcaires/utils.js",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "JavaScript utility library for web and nodejs development",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"unpkg": "./dist/index.min.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "rollup --bundleConfigAsCjs -c ./rollup.config.js",
|
|
24
|
-
"dev": "ts-node
|
|
24
|
+
"dev": "ts-node ./src/index.ts"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/andrewcaires/npm/tree/main/utils.js#readme",
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
46
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
48
47
|
"@rollup/plugin-terser": "^0.4.4",
|
|
49
|
-
"@rollup/plugin-typescript": "^
|
|
50
|
-
"@types/node": "^22.0
|
|
51
|
-
"eslint": "^9.
|
|
52
|
-
"rollup": "^4.
|
|
48
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
49
|
+
"@types/node": "^22.7.0",
|
|
50
|
+
"eslint": "^9.11.1",
|
|
51
|
+
"rollup": "^4.22.4",
|
|
53
52
|
"rollup-plugin-dts": "^6.1.1",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
53
|
+
"ts-node": "^10.9.2",
|
|
54
|
+
"tslib": "^2.7.0",
|
|
55
|
+
"typescript-eslint": "^8.7.0"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|