mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 16:22:59 +10:00
Format code, better function name
This commit is contained in:
@ -55,8 +55,12 @@ export class LinkedInParser implements Parser<JSZip, LinkedIn> {
|
|||||||
|
|
||||||
convert(data: LinkedIn) {
|
convert(data: LinkedIn) {
|
||||||
const result = JSON.parse(JSON.stringify(defaultResumeData)) as ResumeData;
|
const result = JSON.parse(JSON.stringify(defaultResumeData)) as ResumeData;
|
||||||
function avoidToShort(name, len) {
|
function avoidTooShort(name, len) {
|
||||||
if (!name || name.length<len) { return "Unknown" } else { return name; }
|
if (!name || name.length<len) {
|
||||||
|
return "Unknown";
|
||||||
|
} else {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
@ -112,9 +116,9 @@ export class LinkedInParser implements Parser<JSZip, LinkedIn> {
|
|||||||
result.sections.education.items.push({
|
result.sections.education.items.push({
|
||||||
...defaultEducation,
|
...defaultEducation,
|
||||||
id: createId(),
|
id: createId(),
|
||||||
institution: avoidToShort(education["School Name"], 2),
|
institution: avoidTooShort(education["School Name"], 2),
|
||||||
studyType: avoidToShort(education["Degree Name"], 2),
|
studyType: avoidTooShort(education["Degree Name"], 2),
|
||||||
summary: avoidToShort(education.Notes ?? "", 2),
|
summary: avoidTooShort(education.Notes ?? "", 2),
|
||||||
date: `${education["Start Date"]} - ${education["End Date"] ?? "Present"}`,
|
date: `${education["Start Date"]} - ${education["End Date"] ?? "Present"}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user