Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/wankdanker/simple-vcard
- Owner: wankdanker
- Created: 2017-09-01T21:03:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-19T19:00:52.000Z (about 7 years ago)
- Last Synced: 2024-10-13T03:38:26.776Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
* url
* notelicense
-------MIT