Cozy-vcard provides vcard Parser and Objects
cozy-vcard is a simple library to deal with the vcard format. It makes life easier to parse vcard files.
# Importvar vcf = fsreadFileSync'test/friend.vcf' 'utf8';var vparser = vcf;var vcontact = parsercomponents0;var vsomeprop = contactproperties0:// vcontact.org == 'SuperCorp'// someprop.value == '+33123456789'// someprop.name == 'tel'// someprop.type == 'home'// someprop.pref == true# Exportvar vcfString = VCardParsertoVCFvcontact;var vcf = fswriteFileSync'test/friend-export.vcf' vcfString 'utf8';
This vCard importer doesn't try to follow the official RFC. It is just made to handle properly vCards from major vendors: Google, Android, iOS, OSX and thunderbird.
The vCard exporter follow the Google way to write vcards. It can take an option to export the data to Android format or iOS format
Data are stored as direct fields when vendors provide them that way. If not they are handled as "datapoints". One data datapoint has three fields:
name: the category of the data
type: the label of the field
value: the value of the field
If you want to contribute, here is a non-exhaustive list of things to do to make this project perfect!
Handle other vendors:
Cozy is a platform that brings all your web services in the same private space. With it, your web apps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one profiles you. You install only the applications you want. You can build your own one too.
You can reach the Cozy community via various support: