@webdeveric/utils 0.64.0 → 0.66.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.
@@ -25,6 +25,7 @@ __exportStar(require("./isBigIntArray.js"), exports);
25
25
  __exportStar(require("./isBinaryNumberString.js"), exports);
26
26
  __exportStar(require("./isBoolean.js"), exports);
27
27
  __exportStar(require("./isBooleanArray.js"), exports);
28
+ __exportStar(require("./isDateString.js"), exports);
28
29
  __exportStar(require("./isDigitsString.js"), exports);
29
30
  __exportStar(require("./isFiniteNumber.js"), exports);
30
31
  __exportStar(require("./isFunction.js"), exports);
@@ -44,6 +45,7 @@ __exportStar(require("./isNumericString.js"), exports);
44
45
  __exportStar(require("./isNumericValue.js"), exports);
45
46
  __exportStar(require("./isNumericValueArray.js"), exports);
46
47
  __exportStar(require("./isObject.js"), exports);
48
+ __exportStar(require("./isObjectLiteral.js"), exports);
47
49
  __exportStar(require("./isObjectWith.js"), exports);
48
50
  __exportStar(require("./isOctalNumberString.js"), exports);
49
51
  __exportStar(require("./isOptionalArray.js"), exports);
@@ -72,3 +74,4 @@ __exportStar(require("./isSymbolArray.js"), exports);
72
74
  __exportStar(require("./isUndefined.js"), exports);
73
75
  __exportStar(require("./isUndefinedArray.js"), exports);
74
76
  __exportStar(require("./isUnknown.js"), exports);
77
+ __exportStar(require("./isUrlString.js"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDateString = void 0;
4
+ const isDateString = (input) => typeof input === 'string' && !Number.isNaN(new Date(input).getTime());
5
+ exports.isDateString = isDateString;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isObjectLiteral = void 0;
4
+ const isObjectLiteral = (input) => input !== null && typeof input === 'object' && Object.getPrototypeOf(input) === Object.prototype;
5
+ exports.isObjectLiteral = isObjectLiteral;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUrlString = void 0;
4
+ const isUrlString = (input) => {
5
+ return typeof input === 'string' && URL.canParse(input);
6
+ };
7
+ exports.isUrlString = isUrlString;
@@ -9,6 +9,7 @@ export * from './isBigIntArray.js';
9
9
  export * from './isBinaryNumberString.js';
10
10
  export * from './isBoolean.js';
11
11
  export * from './isBooleanArray.js';
12
+ export * from './isDateString.js';
12
13
  export * from './isDigitsString.js';
13
14
  export * from './isFiniteNumber.js';
14
15
  export * from './isFunction.js';
@@ -28,6 +29,7 @@ export * from './isNumericString.js';
28
29
  export * from './isNumericValue.js';
29
30
  export * from './isNumericValueArray.js';
30
31
  export * from './isObject.js';
32
+ export * from './isObjectLiteral.js';
31
33
  export * from './isObjectWith.js';
32
34
  export * from './isOctalNumberString.js';
33
35
  export * from './isOptionalArray.js';
@@ -56,3 +58,4 @@ export * from './isSymbolArray.js';
56
58
  export * from './isUndefined.js';
57
59
  export * from './isUndefinedArray.js';
58
60
  export * from './isUnknown.js';
61
+ export * from './isUrlString.js';
@@ -0,0 +1 @@
1
+ export const isDateString = (input) => typeof input === 'string' && !Number.isNaN(new Date(input).getTime());
@@ -0,0 +1 @@
1
+ export const isObjectLiteral = (input) => input !== null && typeof input === 'object' && Object.getPrototypeOf(input) === Object.prototype;
@@ -0,0 +1,3 @@
1
+ export const isUrlString = (input) => {
2
+ return typeof input === 'string' && URL.canParse(input);
3
+ };
@@ -9,6 +9,7 @@ export * from './isBigIntArray.js';
9
9
  export * from './isBinaryNumberString.js';
10
10
  export * from './isBoolean.js';
11
11
  export * from './isBooleanArray.js';
12
+ export * from './isDateString.js';
12
13
  export * from './isDigitsString.js';
13
14
  export * from './isFiniteNumber.js';
14
15
  export * from './isFunction.js';
@@ -28,6 +29,7 @@ export * from './isNumericString.js';
28
29
  export * from './isNumericValue.js';
29
30
  export * from './isNumericValueArray.js';
30
31
  export * from './isObject.js';
32
+ export * from './isObjectLiteral.js';
31
33
  export * from './isObjectWith.js';
32
34
  export * from './isOctalNumberString.js';
33
35
  export * from './isOptionalArray.js';
@@ -56,3 +58,4 @@ export * from './isSymbolArray.js';
56
58
  export * from './isUndefined.js';
57
59
  export * from './isUndefinedArray.js';
58
60
  export * from './isUnknown.js';
61
+ export * from './isUrlString.js';
@@ -0,0 +1,2 @@
1
+ import type { TypePredicateFn } from '../types/functions.js';
2
+ export declare const isDateString: TypePredicateFn<string>;
@@ -0,0 +1,2 @@
1
+ import type { UnknownRecord } from '../types/records.js';
2
+ export declare const isObjectLiteral: (input: unknown) => input is UnknownRecord;
@@ -0,0 +1 @@
1
+ export declare const isUrlString: (input: unknown) => input is string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webdeveric/utils",
3
3
  "description": "Just another collection of utilities.",
4
- "version": "0.64.0",
4
+ "version": "0.66.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -66,7 +66,7 @@
66
66
  "url": "https://github.com/webdeveric/utils/issues"
67
67
  },
68
68
  "homepage": "https://github.com/webdeveric/utils/#readme",
69
- "packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac",
69
+ "packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184",
70
70
  "scripts": {
71
71
  "clean": "rimraf ./dist/",
72
72
  "prebuild": "pnpm clean",
@@ -87,27 +87,27 @@
87
87
  "devDependencies": {
88
88
  "@commitlint/config-conventional": "^19.8.1",
89
89
  "@commitlint/types": "^19.8.1",
90
- "@types/node": "^22.15.30",
91
- "@vitest/coverage-v8": "^3.2.3",
90
+ "@types/node": "^22.15.34",
91
+ "@vitest/coverage-v8": "^3.2.4",
92
92
  "@webdeveric/eslint-config-ts": "^0.11.0",
93
93
  "@webdeveric/prettier-config": "^0.3.0",
94
94
  "commitlint": "^19.8.1",
95
95
  "commitlint-plugin-cspell": "^0.2.0",
96
96
  "conventional-changelog-conventionalcommits": "^9.0.0",
97
- "cspell": "^9.0.2",
97
+ "cspell": "^9.1.2",
98
98
  "eslint": "^8.57.1",
99
99
  "eslint-config-prettier": "^10.1.5",
100
- "eslint-import-resolver-typescript": "^4.4.3",
101
- "eslint-plugin-import": "^2.31.0",
100
+ "eslint-import-resolver-typescript": "^4.4.4",
101
+ "eslint-plugin-import": "^2.32.0",
102
102
  "husky": "^9.1.7",
103
103
  "jsdom": "^26.1.0",
104
- "lint-staged": "^16.1.0",
105
- "prettier": "^3.5.3",
104
+ "lint-staged": "^16.1.2",
105
+ "prettier": "^3.6.2",
106
106
  "rimraf": "^6.0.1",
107
- "semantic-release": "^24.2.5",
107
+ "semantic-release": "^24.2.6",
108
108
  "typescript": "^5.8.3",
109
109
  "validate-package-exports": "^0.11.0",
110
- "vitest": "^3.2.3"
110
+ "vitest": "^3.2.4"
111
111
  },
112
112
  "pnpm": {
113
113
  "onlyBuiltDependencies": [