@splendidlabz/utils 1.10.7 → 1.11.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
CHANGED
package/dist/cjs/lib/checks.cjs
CHANGED
|
@@ -19,6 +19,7 @@ var checks_exports = {};
|
|
|
19
19
|
__export(checks_exports, {
|
|
20
20
|
getType: () => getType,
|
|
21
21
|
isArray: () => isArray,
|
|
22
|
+
isFunction: () => isFunction,
|
|
22
23
|
isObject: () => isObject,
|
|
23
24
|
notObject: () => notObject
|
|
24
25
|
});
|
|
@@ -47,10 +48,14 @@ function getType(x) {
|
|
|
47
48
|
if (typeof x === "object") return "object";
|
|
48
49
|
return "unknown";
|
|
49
50
|
}
|
|
51
|
+
function isFunction(x) {
|
|
52
|
+
return typeof x === "function";
|
|
53
|
+
}
|
|
50
54
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
55
|
0 && (module.exports = {
|
|
52
56
|
getType,
|
|
53
57
|
isArray,
|
|
58
|
+
isFunction,
|
|
54
59
|
isObject,
|
|
55
60
|
notObject
|
|
56
61
|
});
|
package/dist/esm/lib/checks.js
CHANGED
|
@@ -28,5 +28,6 @@ declare function isArray(x: unknown): boolean;
|
|
|
28
28
|
*/
|
|
29
29
|
declare function notObject(x: unknown): boolean;
|
|
30
30
|
declare function getType(x: any): "string" | "integer" | "float" | "boolean" | "function" | "undefined" | "symbol" | "bigint" | "array" | "object" | "unknown";
|
|
31
|
+
declare function isFunction(x: any): boolean;
|
|
31
32
|
|
|
32
|
-
export { getType, isArray, isObject, notObject };
|
|
33
|
+
export { getType, isArray, isFunction, isObject, notObject };
|
|
@@ -5,7 +5,7 @@ export { sort } from './arrays/sort.cjs';
|
|
|
5
5
|
export { splitArray } from './arrays/split-array.cjs';
|
|
6
6
|
export { uniqueArray } from './arrays/unique.cjs';
|
|
7
7
|
export { AuthManager, RouteManager } from './auth/route-manager.cjs';
|
|
8
|
-
export { getType, isArray, isObject, notObject } from './checks.cjs';
|
|
8
|
+
export { getType, isArray, isFunction, isObject, notObject } from './checks.cjs';
|
|
9
9
|
export { DAYS } from './date/days.cjs';
|
|
10
10
|
export { MONTHS } from './date/months.cjs';
|
|
11
11
|
export { getTimeInMs, ms, toDays, toHours, toMinutes, toReadableTime, toSeconds, toWeeks } from './date/time.cjs';
|
package/package.json
CHANGED