const inputString = ``; //put here example : `izndgmfvidfik|HeavenGanteng1.:wiemyedryp@hotmail.com|bbuSuX46`
// Split the input string by newline characters
const lines = inputString.split('\n');
// Extract the first part before the pipe separator for each line
const convertedLines = lines.map((line) => {
const firstPart = line.split('|')[0];
return `"${firstPart.trim()}"`; // Add double quotes around the first part and trim any leading or trailing whitespace
});
// Convert the array of lines back to a string, joining them with comma and newline characters
const convertedString = convertedLines.join(',\n');
console.log(convertedString);