Skip to content

Instantly share code, notes, and snippets.

@stevesinchak
stevesinchak / vcard.js
Last active January 9, 2024 03:12
JavaScript vCard VSF Generator
// Custom VCARD generator function by Steve Sinchak
// vcard reference specification
// https://www.rfc-editor.org/rfc/rfc6350.html
// https://en.wikipedia.org/wiki/VCard
// Pass this function the required parameters, and if they are defined, they will be added to the vCard
// The text of the vCard will be returned
function buildCard(vFirstName, vMiddleName, vLastName, vTitle, vSuffix, vNick, vEmail, vEmail2, vEmail3, vHomePhone,