@matterbridge/utils 3.7.6-dev-20260430-44fc966 → 3.7.6
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/validate.d.ts +1 -0
- package/dist/validate.js +3 -0
- package/package.json +2 -2
package/dist/validate.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export declare function isValidObject(value: unknown, minLength?: number, maxLen
|
|
|
7
7
|
export declare function isValidArray(value: unknown, minLength?: number, maxLength?: number): value is unknown[];
|
|
8
8
|
export declare function isValidNull(value: unknown): value is null;
|
|
9
9
|
export declare function isValidUndefined(value: unknown): value is undefined;
|
|
10
|
+
export declare function isValidPromise(value: unknown): value is Promise<unknown>;
|
|
10
11
|
export declare function parseVersionString(versionString: string): number | undefined;
|
package/dist/validate.js
CHANGED
|
@@ -51,6 +51,9 @@ export function isValidNull(value) {
|
|
|
51
51
|
export function isValidUndefined(value) {
|
|
52
52
|
return value === undefined;
|
|
53
53
|
}
|
|
54
|
+
export function isValidPromise(value) {
|
|
55
|
+
return value !== undefined && value !== null && value instanceof Promise;
|
|
56
|
+
}
|
|
54
57
|
export function parseVersionString(versionString) {
|
|
55
58
|
if (!isValidString(versionString))
|
|
56
59
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/utils",
|
|
3
|
-
"version": "3.7.6
|
|
3
|
+
"version": "3.7.6",
|
|
4
4
|
"description": "Matterbridge utils library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"CHANGELOG.md"
|
|
138
138
|
],
|
|
139
139
|
"dependencies": {
|
|
140
|
-
"@matterbridge/jest-utils": "3.7.6
|
|
140
|
+
"@matterbridge/jest-utils": "3.7.6",
|
|
141
141
|
"node-ansi-logger": "3.2.1"
|
|
142
142
|
}
|
|
143
143
|
}
|