@webdeveric/utils 0.69.0 → 0.70.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.
@@ -26,6 +26,7 @@ __exportStar(require("./isBigIntArray.js"), exports);
26
26
  __exportStar(require("./isBinaryNumberString.js"), exports);
27
27
  __exportStar(require("./isBoolean.js"), exports);
28
28
  __exportStar(require("./isBooleanArray.js"), exports);
29
+ __exportStar(require("./isDateInputString.js"), exports);
29
30
  __exportStar(require("./isDateString.js"), exports);
30
31
  __exportStar(require("./isDigitsString.js"), exports);
31
32
  __exportStar(require("./isFiniteNumber.js"), exports);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDateInputString = void 0;
4
+ const isDateInputString = (input) => typeof input === 'string' && !Number.isNaN(Date.parse(input));
5
+ exports.isDateInputString = isDateInputString;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDateString = void 0;
4
- const isDateString = (input) => typeof input === 'string' && !Number.isNaN(Date.parse(input));
5
- exports.isDateString = isDateString;
4
+ const isDateInputString_js_1 = require("./isDateInputString.js");
5
+ exports.isDateString = isDateInputString_js_1.isDateInputString;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isISODateString = exports.ISO_DATE_PATTERN = void 0;
4
4
  const matching_js_1 = require("./factory/matching.js");
5
- exports.ISO_DATE_PATTERN = /^(?<year>\d{4,})-(?<month>[01]\d)-(?<day>0[1-9]|[12]\d|3[01])T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})\.(?<timezone>\d{3}Z)$/;
5
+ exports.ISO_DATE_PATTERN = /^(?<year>\d{4,})-(?<month>[01]\d)-(?<day>0[1-9]|[12]\d|3[01])T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})\.(?<timezone>\d+Z)$/;
6
6
  exports.isISODateString = (0, matching_js_1.matching)(exports.ISO_DATE_PATTERN);
@@ -10,6 +10,7 @@ export * from './isBigIntArray.js';
10
10
  export * from './isBinaryNumberString.js';
11
11
  export * from './isBoolean.js';
12
12
  export * from './isBooleanArray.js';
13
+ export * from './isDateInputString.js';
13
14
  export * from './isDateString.js';
14
15
  export * from './isDigitsString.js';
15
16
  export * from './isFiniteNumber.js';
@@ -0,0 +1 @@
1
+ export const isDateInputString = (input) => typeof input === 'string' && !Number.isNaN(Date.parse(input));
@@ -1 +1,2 @@
1
- export const isDateString = (input) => typeof input === 'string' && !Number.isNaN(Date.parse(input));
1
+ import { isDateInputString } from './isDateInputString.js';
2
+ export const isDateString = isDateInputString;
@@ -1,3 +1,3 @@
1
1
  import { matching } from './factory/matching.js';
2
- export const ISO_DATE_PATTERN = /^(?<year>\d{4,})-(?<month>[01]\d)-(?<day>0[1-9]|[12]\d|3[01])T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})\.(?<timezone>\d{3}Z)$/;
2
+ export const ISO_DATE_PATTERN = /^(?<year>\d{4,})-(?<month>[01]\d)-(?<day>0[1-9]|[12]\d|3[01])T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})\.(?<timezone>\d+Z)$/;
3
3
  export const isISODateString = matching(ISO_DATE_PATTERN);
@@ -10,6 +10,7 @@ export * from './isBigIntArray.js';
10
10
  export * from './isBinaryNumberString.js';
11
11
  export * from './isBoolean.js';
12
12
  export * from './isBooleanArray.js';
13
+ export * from './isDateInputString.js';
13
14
  export * from './isDateString.js';
14
15
  export * from './isDigitsString.js';
15
16
  export * from './isFiniteNumber.js';
@@ -0,0 +1,3 @@
1
+ import type { DateInputString } from '../types/date-time.js';
2
+ import type { TypePredicateFn } from '../types/functions.js';
3
+ export declare const isDateInputString: TypePredicateFn<DateInputString>;
@@ -1,6 +1,7 @@
1
1
  import type { Branded } from './branded.js';
2
2
  import type { NumericString } from './common.js';
3
3
  export type DateInput = ConstructorParameters<typeof Date>[0];
4
+ export type DateInputString = Branded<string, 'DateInputString'>;
4
5
  export type YearString = Branded<NumericString<number>, 'YearString'>;
5
6
  export type MonthString = Branded<NumericString<number>, 'MonthString'>;
6
7
  export type DayString = Branded<NumericString<number>, 'DayString'>;
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.69.0",
4
+ "version": "0.70.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.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
69
+ "packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
70
70
  "scripts": {
71
71
  "clean": "rimraf ./dist/",
72
72
  "prebuild": "pnpm clean",
@@ -87,7 +87,7 @@
87
87
  "devDependencies": {
88
88
  "@commitlint/config-conventional": "^19.8.1",
89
89
  "@commitlint/types": "^19.8.1",
90
- "@types/node": "^22.16.5",
90
+ "@types/node": "^22.17.2",
91
91
  "@vitest/coverage-v8": "^3.2.4",
92
92
  "@webdeveric/eslint-config-ts": "^0.11.0",
93
93
  "@webdeveric/prettier-config": "^0.3.0",
@@ -101,12 +101,12 @@
101
101
  "eslint-plugin-import": "^2.32.0",
102
102
  "husky": "^9.1.7",
103
103
  "jsdom": "^26.1.0",
104
- "lint-staged": "^16.1.2",
104
+ "lint-staged": "^16.1.5",
105
105
  "prettier": "^3.6.2",
106
106
  "rimraf": "^6.0.1",
107
107
  "semantic-release": "^24.2.7",
108
- "typescript": "^5.8.3",
109
- "validate-package-exports": "^0.12.0",
108
+ "typescript": "^5.9.2",
109
+ "validate-package-exports": "^0.13.0",
110
110
  "vitest": "^3.2.4"
111
111
  },
112
112
  "pnpm": {