vcard-generator
VCard v4.0 rfc6350 compliant generator from JSON.
Install
npm install --save vcard-generator
Usage
; const vcardContent = vcard; // returnsBEGIN:VCARDVERSION:40N:Doe;John;Philip;Dr;JrFN:Mr JohnyNICKNAME:PhilX-MAIDENNAME:MaidenNameX-PHONETIC-FIRST-NAME:PhoneticFirstNameX-PHONETIC-MIDDLE-NAME:PhoneticMiddleNameX-PHONETIC-LAST-NAME:PhoneticLastNameX-PRONUNCIATION-FIRST-NAME:PronunciationFirstNameX-PRONUNCIATION-MIDDLE-NAME:PronunciationMiddleNameX-PRONUNCIATION-LAST-NAME:PronunciationLastNameORG:My Company\ IncTITLE:CEOROLE:ExecutiveEMAIL;PREF=1;TYPE=work:john@mycompanycomEMAIL;PREF=2;TYPE=home:johndoe@examplecomTEL;PREF=1;TYPE=work: 567-8901TEL;PREF=2:123 123-1234TEL;VALUE=uri;PREF=3:tel:1234567890ADR;PREF=1;TYPE=work:;;123 Forbes Ave\ Apt 1;San Francisco;CA;12345;USAADR;PREF=2;TYPE=home:;;456 Home St;Homeland;CA;23456;USAX-SOCIALPROFILE;PREF=1;TYPE=facebook:http://www.facebook.com/johndoeX-SOCIALPROFILE;PREF=2;TYPE=twitter;x-user=johnie:x-apple:johnieURL;PREF=1;TYPE=internet:http://www.mycompany.comURL;PREF=2;TYPE=personal:http://www.johndoe.comPHOTO;PREF=1;TYPE=work:https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svgPHOTO;PREF=2;TYPE=home:data:image/png;base64iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCCBDAY:20000131GENDER:MNOTE;PREF=1:John Doe has a long and varied history\ being documented on more police files that anyone else\nReports of his death are alas numerousNOTE;PREF=2:Another noteEND:VCARD