@enure/jacklin 2.1.1 → 3.1.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/index.js CHANGED
@@ -5536,13 +5536,6 @@ var import_handlebars = __toESM(require_lib(), 1);
5536
5536
  import { fileURLToPath } from "url";
5537
5537
  import { dirname, resolve } from "path";
5538
5538
  import { readFileSync } from "fs";
5539
- import_handlebars.default.registerHelper("summaryToList", (string) => {
5540
- if (string.includes("|")) {
5541
- return `<ul class="SummaryList">${string.split("|").map((listItem) => `<li class="SummaryList-item">${listItem}</li>`).join("")}</ul>`;
5542
- } else {
5543
- return string;
5544
- }
5545
- });
5546
5539
  import_handlebars.default.registerHelper("getShortDate", (dateStr) => {
5547
5540
  if (typeof dateStr === "string") {
5548
5541
  const date = new Date(dateStr);
package/index.ts CHANGED
@@ -3,16 +3,7 @@ import { dirname, resolve } from "path";
3
3
  import { readFileSync } from "fs";
4
4
  import Handlebars from "handlebars";
5
5
 
6
- Handlebars.registerHelper("summaryToList", (string) => {
7
- if (string.includes("|")) {
8
- return `<ul class="SummaryList">${string
9
- .split("|")
10
- .map((listItem: string) => `<li class="SummaryList-item">${listItem}</li>`)
11
- .join("")}</ul>`;
12
- } else {
13
- return string;
14
- }
15
- });
6
+ Handlebars.registerHelper("or", (a, b) => a || b);
16
7
 
17
8
  Handlebars.registerHelper("getShortDate", (dateStr) => {
18
9
  if (typeof dateStr === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enure/jacklin",
3
- "version": "2.1.1",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -156,7 +156,10 @@
156
156
  {{getShortDate this.startDate}} to {{#if this.endDate }}{{getShortDate this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
157
157
  </div>
158
158
  <div class="WorkList-summary">
159
- {{{summaryToList this.summary}}}
159
+ <ul class="SummaryList">
160
+ {{#each this.summaryItems}}
161
+ <li class="SummaryList-item">{{this}}</li>
162
+ {{/each}}
160
163
  </div>
161
164
  {{#if this.highlights}}
162
165
  <ul class="WorkList-highlights">
@@ -174,7 +177,7 @@
174
177
  <h2>Work History, cont.</h2>
175
178
  <ul class="SummaryList">
176
179
  {{#each work}}
177
- {{#unless this.isFeatured}}
180
+ {{#unless (or this.isFeatured this.hide)}}
178
181
  <li class="SummaryList-item">
179
182
  <span class="SummaryList-itemName">{{this.name}}</span> <span class="SummaryList-itemPosition">({{this.position}})</span>
180
183
  </li>