{"_id":"@b.taranenko/vcards-js","_rev":"1-f4b9e846ac7bbcd8f2ece01feb3844f9","name":"@b.taranenko/vcards-js","dist-tags":{"latest":"2.10.0"},"versions":{"2.10.0":{"name":"@b.taranenko/vcards-js","version":"2.10.0","description":"Create vCards to import contacts into Outlook, iOS, Mac OS, Android devices, and more.","main":"index.js","dependencies":{},"devDependencies":{"mocha":"~5.2.0"},"scripts":{"test":"mocha ./test/tests"},"repository":{"type":"git","url":"git+https://github.com/enesser/vCards-js.git"},"keywords":["vCard","vCards","contacts"],"author":{"name":"Eric J Nesser"},"license":"MIT","bugs":{"url":"https://github.com/enesser/vCards-JS/issues"},"homepage":"https://github.com/enesser/vCards-JS","contributors":[{"name":"Eric J Nesser","email":"enesser@gmail.com","url":"https://github.com/enesser"},{"name":"Tobias Müller","url":"https://github.com/webdepp"},{"name":"Julian Krenge","url":"https://github.com/jkrenge"},{"name":"Charlie Hulcher","url":"https://github.com/c-h-"},{"name":"Jimmy Tsao","email":"jimmy.tsao@gmail.com","url":"https://github.com/jimmytsao"},{"name":"Michael Polino","url":"https://github.com/mplno"},{"name":"sensotix","url":"https://github.com/sensotix"},{"name":"Randy Stevens","url":"https://github.com/RandyStevens"}],"gitHead":"a19d88602f21df58d519666b2ec01faa8a52f597","_id":"@b.taranenko/vcards-js@2.10.0","_npmVersion":"5.7.1","_nodeVersion":"8.10.0","_npmUser":{"name":"b.taranenko","email":"bogdan13taranenko@gmail.com"},"dist":{"integrity":"sha512-VwachE8nANxqJMyL7Thqgg+16oBU9kotv4JsqsKMk20VJ5xFBeCrn6n4ToFdOmf7sgvMh6tDlxgP8LLU17723w==","shasum":"0d327c0695976e38b37de61753bdf2bc29fbc3b7","tarball":"https://registry.npmjs.org/@b.taranenko/vcards-js/-/vcards-js-2.10.0.tgz","fileCount":9,"unpackedSize":42439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1EaGCRA9TVsSAnZWagAAWgIP/0aTdCz86l34nUmG6/oF\nTFZ5VxyjXxkycbfLZQzuYnzArJ04CGEKfcAwSonWo/ku1mQtB1PlhBP5XJng\n46fd39nYzadwK/SFpTBXDzFpW2ZqGs/UHfGOgQ3e87rzdhNM1qk1xPvVlFgC\n8DTM1/XprwC8Zdzd35ynYKq+0wqsW2oOhObLOkj7gPXADS9pmms1iv9XwiHw\nTscKVRPwFnEYjJIMWMm6FcgrrbGYSsp/I6mBwbWz/8K8DkuS9JdjBIu/Pgx+\nWK5QIsg/Tjv/+i+mjwza0Q7yqKN2tAVlvJyWkg0+p0nHvtCM1XjnAvJiEOKD\nHxKVexpn7H5f2M3MhI6I4iL9yV+I3jpeCcXY18k0qGh4jZqRt4wwdRZGcEzQ\n591pq/baHkoXvCEfhjxQpvWiuU4XeoYeJrJ122KTim8kK9x8n0nyh+imU9cY\nyFGOyjsBMs1v+a8HbCvGlVAQ3VZ7f7k/VnQhYgcNG7+AYiOxkmgmGp4b4kYQ\n/Dyotuu1cnElvvGM0fDkJlF6f2cvOLGa9YAoFrbdzEhkRR7phhBtGCGSZze8\neOBSFYeqLS9R6Ztr1B6jJS3hrrZLYDFMrWIo3NkVropdNCUpcNdEEjye8Cv/\nFFMeqhmln7SGMujMd4AaX9+pzJmw90AWogYyNQ3gowGTSMYeo+lM/u3EC8Lt\ndkYZ\r\n=IwYo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFAuYs7pukZCVZFzn8PwkF/65XTpis5dvgCW1j9Lr1cAiEAgOJGfptnVNE53anThFiYW00t36hOQxu1+i2BwI/wzYc="}]},"maintainers":[{"name":"b.taranenko","email":"bogdan13taranenko@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vcards-js_2.10.0_1557415557539_0.8383150594207458"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-09T15:25:57.510Z","2.10.0":"2019-05-09T15:25:57.670Z","modified":"2022-04-04T17:23:43.152Z"},"maintainers":[{"name":"b.taranenko","email":"bogdan13taranenko@gmail.com"}],"description":"Create vCards to import contacts into Outlook, iOS, Mac OS, Android devices, and more.","homepage":"https://github.com/enesser/vCards-JS","keywords":["vCard","vCards","contacts"],"repository":{"type":"git","url":"git+https://github.com/enesser/vCards-js.git"},"contributors":[{"name":"Eric J Nesser","email":"enesser@gmail.com","url":"https://github.com/enesser"},{"name":"Tobias Müller","url":"https://github.com/webdepp"},{"name":"Julian Krenge","url":"https://github.com/jkrenge"},{"name":"Charlie Hulcher","url":"https://github.com/c-h-"},{"name":"Jimmy Tsao","email":"jimmy.tsao@gmail.com","url":"https://github.com/jimmytsao"},{"name":"Michael Polino","url":"https://github.com/mplno"},{"name":"sensotix","url":"https://github.com/sensotix"},{"name":"Randy Stevens","url":"https://github.com/RandyStevens"}],"author":{"name":"Eric J Nesser"},"bugs":{"url":"https://github.com/enesser/vCards-JS/issues"},"license":"MIT","readme":"vCards JS\n=====\n\n[![Build Status](https://travis-ci.org/enesser/vCards-js.svg?branch=master)](https://travis-ci.org/enesser/vCards-js.svg?branch=master)\n\nCreate vCards to import contacts into Outlook, iOS, Mac OS, and Android devices from your website or application.\n\n![Screenshot](https://cloud.githubusercontent.com/assets/5659221/5240131/f99c1f3e-78c1-11e4-83b1-4f6e70eecf65.png)\n\n## Install\n\n```sh\nnpm install vcards-js --save\n```\n\n## Usage\n\nBelow is a simple example of how to create a basic vCard and how to save it to a file, or view its contents from the console.\n\n### Basic vCard\n\n```js\nvar vCardsJS = require('vcards-js');\n\n//create a new vCard\nvar vCard = vCardsJS();\n\n//set properties\nvCard.firstName = 'Eric';\nvCard.middleName = 'J';\nvCard.lastName = 'Nesser';\nvCard.organization = 'ACME Corporation';\nvCard.photo.attachFromUrl('https://avatars2.githubusercontent.com/u/5659221?v=3&s=460', 'JPEG');\nvCard.workPhone = '312-555-1212';\nvCard.birthday = new Date(1985, 0, 1);\nvCard.title = 'Software Developer';\nvCard.url = 'https://github.com/enesser';\nvCard.note = 'Notes on Eric';\n\n//save to file\nvCard.saveToFile('./eric-nesser.vcf');\n\n//get as formatted string\nconsole.log(vCard.getFormattedString());\n\n```\n\n### On the Web\n\nYou can use vCards JS on your website. Below is an example of how to get it working on Express 4.\n\n```js\n\nvar express = require('express');\nvar router = express.Router();\n\nmodule.exports = function (app) {\n  app.use('/', router);\n};\n\nrouter.get('/', function (req, res, next) {\n\n    var vCardsJS = require('vcards-js');\n\n    //create a new vCard\n    var vCard = vCardsJS();\n\n    //set properties\n    vCard.firstName = 'Eric';\n    vCard.middleName = 'J';\n    vCard.lastName = 'Nesser';\n    vCard.organization = 'ACME Corporation';\n\n    //set content-type and disposition including desired filename\n    res.set('Content-Type', 'text/vcard; name=\"enesser.vcf\"');\n    res.set('Content-Disposition', 'inline; filename=\"enesser.vcf\"');\n\n    //send the response\n    res.send(vCard.getFormattedString());\n});\n\n```\n\n### Embedding Images\n\nYou can embed images in the photo or logo field instead of linking to them from a URL using base64 encoding.\n\n```js\n//can be Windows or Linux/Unix path structures, and JPEG, PNG, GIF formats\nvCard.photo.embedFromFile('/path/to/file.png');\nvCard.logo.embedFromFile('/path/to/file.png');\n```\n\n```js\n//can also embed images via base-64 encoded strings\nvCard.photo.embedFromString('iVBORw0KGgoAAAANSUhEUgAAA2...', 'image/png');\nvCard.logo.embedFromString('iVBORw0KGgoAAAANSUhEUgAAA2...', 'image/png');\n```\n\n### Date Reference\n\nMDN reference on how to use the `Date` object for birthday and anniversary can be found at [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).\n\n### Complete Example\n\nThe following shows a vCard with everything filled out.\n\n```js\nvar vCardJS = require('vcards-js');\n\n//create a new vCard\nvar vCard = vCardsJS();\n\n//set basic properties shown before\nvCard.firstName = 'Eric';\nvCard.middleName = 'J';\nvCard.lastName = 'Nesser';\nvCard.uid = '69531f4a-c34d-4a1e-8922-bd38a9476a53';\nvCard.organization = 'ACME Corporation';\n\n//link to image\nvCard.photo.attachFromUrl('https://avatars2.githubusercontent.com/u/5659221?v=3&s=460', 'JPEG');\n\n//or embed image\nvCard.photo.attachFromUrl('/path/to/file.jpeg');\n\nvCard.workPhone = '312-555-1212';\nvCard.birthday = new Date(1985, 0, 1);\nvCard.title = 'Software Developer';\nvCard.url = 'https://github.com/enesser';\nvCard.workUrl = 'https://acme-corporation/enesser';\nvCard.note = 'Notes on Eric';\n\n//set other vitals\nvCard.nickname = 'Scarface';\nvCard.namePrefix = 'Mr.';\nvCard.nameSuffix = 'JR';\nvCard.gender = 'M';\nvCard.anniversary = new Date(2004, 0, 1);\nvCard.role = 'Software Development';\n\n//set other phone numbers\nvCard.homePhone = '312-555-1313';\nvCard.cellPhone = '312-555-1414';\nvCard.pagerPhone = '312-555-1515';\n\n//set fax/facsimile numbers\nvCard.homeFax = '312-555-1616';\nvCard.workFax = '312-555-1717';\n\n//set email addresses\nvCard.email = 'e.nesser@emailhost.tld';\nvCard.workEmail = 'e.nesser@acme-corporation.tld';\n\n//set logo of organization or personal logo (also supports embedding, see above)\nvCard.logo.attachFromUrl('https://avatars2.githubusercontent.com/u/5659221?v=3&s=460', 'JPEG');\n\n//set URL where the vCard can be found\nvCard.source = 'http://mywebpage/myvcard.vcf';\n\n//set address information\nvCard.homeAddress.label = 'Home Address';\nvCard.homeAddress.street = '123 Main Street';\nvCard.homeAddress.city = 'Chicago';\nvCard.homeAddress.stateProvince = 'IL';\nvCard.homeAddress.postalCode = '12345';\nvCard.homeAddress.countryRegion = 'United States of America';\n\nvCard.workAddress.label = 'Work Address';\nvCard.workAddress.street = '123 Corporate Loop\\nSuite 500';\nvCard.workAddress.city = 'Los Angeles';\nvCard.workAddress.stateProvince = 'CA';\nvCard.workAddress.postalCode = '54321';\nvCard.workAddress.countryRegion = 'United States of America';\n\n//set social media URLs\nvCard.socialUrls['facebook'] = 'https://...';\nvCard.socialUrls['linkedIn'] = 'https://...';\nvCard.socialUrls['twitter'] = 'https://...';\nvCard.socialUrls['flickr'] = 'https://...';\nvCard.socialUrls['custom'] = 'https://...';\n\n//you can also embed photos from files instead of attaching via URL\nvCard.photo.embedFromFile('photo.jpg');\nvCard.logo.embedFromFile('logo.jpg');\n\nvCard.version = '3.0'; //can also support 2.1 and 4.0, certain versions only support certain fields\n\n//save to file\nvCard.saveToFile('./eric-nesser.vcf');\n\n//get as formatted string\nconsole.log(vCard.getFormattedString());\n```\n\n### Multiple Email, Fax, & Phone Examples\n\n`email`, `otherEmail`, `cellPhone`, `pagerPhone`, `homePhone`, `workPhone`, `homeFax`, `workFax`, `otherPhone` all support multiple entries in an array format.\n\nExamples are provided below:\n\n```js\nvar vCardsJS = require('vcards-js');\n\n//create a new vCard\nvar vCard = vCardsJS();\n\n//multiple email entry\nvCard.email = [\n    'e.nesser@emailhost.tld',\n    'e.nesser@emailhost2.tld',\n    'e.nesser@emailhost3.tld'\n];\n\n//multiple cellphone\nvCard.cellPhone = [\n    '312-555-1414',\n    '312-555-1415',\n    '312-555-1416'\n];\n\n```\n\n### Apple AddressBook Extensions\n\nYou can mark as a contact as an organization with the following Apple AddressBook extension property:\n\n```js\n    var vCardsJS = require('vcards-js');\n    var vCard = vCardsJS();\n    vCard.isOrganization = true;\n```\n\n## React Native\n\nA React Native version exists here at this repository --\n[https://github.com/idxbroker/vCards-js/tree/react-native](https://github.com/idxbroker/vCards-js/tree/react-native)\n\n## Testing\n\nYou can run the vCard unit tests via `npm`:\n\n```sh\nnpm test\n```\n\n## Contributions\n\nContributions are always welcome!\n\nAdditional thanks to --\n* Tobias Müller ([https://github.com/webdepp](https://github.com/webdepp))\n* Julian Krenge ([https://github.com/jkrenge](https://github.com/jkrenge))\n* Charlie Hulcher ([https://github.com/c-h-](https://github.com/c-h-))\n* Jimmy Tsao ([https://github.com/jimmytsao](https://github.com/jimmytsao))\n* Michael Polino ([https://github.com/mplno](https://github.com/mplno))\n* Randy Stevens ([https://github.com/RandyStevens](https://github.com/RandyStevens))\n\n## Donations\n\nBTC 18N1g2o1b9u2jNPbSpGHhV6x5xs6Qou3EV\n\n## License\nCopyright (c) 2014-2019 Eric J Nesser MIT","readmeFilename":"README.md"}