From befc5a67fc7600158d859cfb20dc0fbc1333e1fb Mon Sep 17 00:00:00 2001 From: Zsombor Gegesy Date: Mon, 26 Feb 2024 00:10:18 +0100 Subject: [PATCH] Format code, better function name --- libs/parser/src/linkedin/index.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libs/parser/src/linkedin/index.ts b/libs/parser/src/linkedin/index.ts index 631d0e62..3e0254f4 100644 --- a/libs/parser/src/linkedin/index.ts +++ b/libs/parser/src/linkedin/index.ts @@ -55,8 +55,12 @@ export class LinkedInParser implements Parser { convert(data: LinkedIn) { const result = JSON.parse(JSON.stringify(defaultResumeData)) as ResumeData; - function avoidToShort(name, len) { - if (!name || name.length { result.sections.education.items.push({ ...defaultEducation, id: createId(), - institution: avoidToShort(education["School Name"], 2), - studyType: avoidToShort(education["Degree Name"], 2), - summary: avoidToShort(education.Notes ?? "", 2), + institution: avoidTooShort(education["School Name"], 2), + studyType: avoidTooShort(education["Degree Name"], 2), + summary: avoidTooShort(education.Notes ?? "", 2), date: `${education["Start Date"]} - ${education["End Date"] ?? "Present"}`, }); }