nhb-toolbox 4.10.40 → 4.10.44

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.
@@ -58,24 +58,28 @@ function isDateLike(value) {
58
58
  // Chronos, Moment or Day.js
59
59
  if (typeof v.format === 'function' &&
60
60
  typeof v.toJSON === 'function' &&
61
- typeof v.toISOString === 'function')
61
+ typeof v.toISOString === 'function') {
62
62
  return true;
63
+ }
63
64
  // Luxon
64
65
  if (typeof v.toISO === 'function' &&
65
66
  typeof v.toFormat === 'function' &&
66
- typeof v.isValid === 'boolean')
67
+ typeof v.isValid === 'boolean') {
67
68
  return true;
69
+ }
68
70
  // JS-Joda
69
71
  if (typeof v.plus === 'function' &&
70
72
  typeof v.minus === 'function' &&
71
73
  typeof v.equals === 'function' &&
72
- typeof v.getClass === 'function')
74
+ typeof v.getClass === 'function') {
73
75
  return true;
76
+ }
74
77
  // Temporal
75
78
  if (typeof v.toJSON === 'function' &&
76
79
  typeof v.toString === 'function' &&
77
- ['PlainDate', 'ZonedDateTime', 'Instant'].includes(v.constructor?.name ?? ''))
80
+ ['PlainDate', 'ZonedDateTime', 'Instant'].includes(v.constructor?.name ?? '')) {
78
81
  return true;
82
+ }
79
83
  }
80
84
  return false;
81
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../src/date/guards.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAWzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAInE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKjD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA2ClD"}
1
+ {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../src/date/guards.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAWzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAInE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKjD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA+ClD"}
@@ -52,24 +52,28 @@ export function isDateLike(value) {
52
52
  // Chronos, Moment or Day.js
53
53
  if (typeof v.format === 'function' &&
54
54
  typeof v.toJSON === 'function' &&
55
- typeof v.toISOString === 'function')
55
+ typeof v.toISOString === 'function') {
56
56
  return true;
57
+ }
57
58
  // Luxon
58
59
  if (typeof v.toISO === 'function' &&
59
60
  typeof v.toFormat === 'function' &&
60
- typeof v.isValid === 'boolean')
61
+ typeof v.isValid === 'boolean') {
61
62
  return true;
63
+ }
62
64
  // JS-Joda
63
65
  if (typeof v.plus === 'function' &&
64
66
  typeof v.minus === 'function' &&
65
67
  typeof v.equals === 'function' &&
66
- typeof v.getClass === 'function')
68
+ typeof v.getClass === 'function') {
67
69
  return true;
70
+ }
68
71
  // Temporal
69
72
  if (typeof v.toJSON === 'function' &&
70
73
  typeof v.toString === 'function' &&
71
- ['PlainDate', 'ZonedDateTime', 'Instant'].includes(v.constructor?.name ?? ''))
74
+ ['PlainDate', 'ZonedDateTime', 'Instant'].includes(v.constructor?.name ?? '')) {
72
75
  return true;
76
+ }
73
77
  }
74
78
  return false;
75
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "4.10.40",
3
+ "version": "4.10.44",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -60,7 +60,6 @@
60
60
  "@typescript-eslint/eslint-plugin": "^8.21.0",
61
61
  "@typescript-eslint/parser": "^8.21.0",
62
62
  "chalk": "4.1.2",
63
- "dayjs": "^1.11.13",
64
63
  "eslint": "^9.18.0",
65
64
  "eslint-config-prettier": "^10.0.1",
66
65
  "eslint-plugin-prettier": "^5.2.3",
@@ -68,9 +67,6 @@
68
67
  "globals": "^15.14.0",
69
68
  "globby": "^14.0.2",
70
69
  "jest": "^29.7.0",
71
- "js-joda": "^1.11.0",
72
- "luxon": "^3.6.1",
73
- "moment": "^2.30.1",
74
70
  "prettier": "^3.4.2",
75
71
  "progress-estimator": "^0.3.1",
76
72
  "rimraf": "^6.0.1",