Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wankdanker/simple-vcard

A module to transform simple javascript objects into vCards and vLists
https://github.com/wankdanker/simple-vcard

Last synced: 2 months ago
JSON representation

A module to transform simple javascript objects into vCards and vLists

Awesome Lists containing this project

README

        

simple-vcard
------------

A module to transform simple javascript objects into vCards and vLists

example
-------

```js
var vCard = require('simple-vcard');

var jCard = {
id : 'dfcc7456-8f56-11e7-bc32-d76e3ad96585'
, displayName : 'Steve Baker'
, phone : '555-555-5555'
, email : '[email protected]'
, address1 : 'Street Address 1'
, address2 : 'Street Address 2'
, city : 'LA'
, region : 'CA'
, postalCode : '30303'
, country : 'US'
, company : 'Steve\'s Company'
, title : "Manager"
};

var result = vCard.toVCard(jCard);
```
#### Result
```
BEGIN:VCARD
VERSION:3.0
CLASS:PUBLIC
PROFILE:VCARD
UID:dfcc7456-8f56-11e7-bc32-d76e3ad96585
FN:Steve Baker
TITLE:Manager
ADR:;Street Address 2;Street Address 1;LA;CA;30303;US
ORG:Steve's Company
TEL:555-555-5555
EMAIL:[email protected]
END:VCARD
```

vCard.toVCard(jCard)
-------------------

jCard is a Javascript object containing any of these attributes:

* id
* lastName
* firstName
* middleInitial
* prefix
* nickName
* displayName
* title
* role
* screenName
* birthday
* po
* address2
* address1
* city
* region
* postalCode
* country
* company
* phone
* email
* url
* note

license
-------

MIT