fix(import): LinkedIn Profile.csv parsing fixes

This commit is contained in:
Sergej Kasper
2024-01-15 10:43:32 +01:00
parent e1ec60af92
commit 45a936c05d
2 changed files with 23 additions and 10 deletions

View File

@ -12,3 +12,11 @@ export const parseCSV = async (string: string) => {
});
});
};
/**
* Parser for cases when we receive an array like structure f.e. a in the LinkedIn Profile.csv import
* @param csvEntry array-like entry such as [TAG:https://some.link,TAG:https://someother.link]
* @returns
*/
export const parseArrayLikeCSVEntry = (csvEntry: string) =>
csvEntry.replace(/^\[/, "").replace(/$\]/, "").split(",");