@enure/jacklin 3.4.0 → 3.4.1

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.
Files changed (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5540,9 +5540,12 @@ import_handlebars.default.registerHelper("or", (a, b) => a || b);
5540
5540
  import_handlebars.default.registerHelper("getShortDate", (dateStr) => {
5541
5541
  if (typeof dateStr === "string") {
5542
5542
  const date = new Date(dateStr);
5543
+ if (isNaN(date.getTime())) {
5544
+ throw new Error(`Invalid date: "${dateStr}"`);
5545
+ }
5543
5546
  const year = date.getFullYear();
5544
5547
  const month = date.getMonth() + 1;
5545
- const fullMonth = month.toString().length === 1 ? `0${month}` : month;
5548
+ const fullMonth = String(month).padStart(2, "0");
5546
5549
  return `${fullMonth}/${year}`;
5547
5550
  } else {
5548
5551
  return dateStr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enure/jacklin",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "A JSON Resume theme. Renders resume data to HTML with a bundled Handlebars template.",
5
5
  "type": "module",
6
6
  "main": "./index.js",