Create vendor-agnostic vcard contact files - virginity TypeScript fork.

Usage no npm install needed!

<script type="module">
  import virginityTs from '';



A module for creating vendor-agnostic vcard contact files.


With this module, I assert that users would favor the ability to move contact cards across platforms versus support for every possible vcard option. I only add options that are platform agnostic and relevant (sorry, no support for pagers).


The module exposes the function compile, which takes an object filled with contact data and returns a formatted vcard string. Write this string to a .vcf file and you've got yourself a card that can be imported into your favorite contact application.

var contact = {
    name: {
        first: 'Michael',
        additional: ['Robert'],
        last: 'Polino'
    categories: ['Friend'],
    email: [{
        type: 'personal',
        address: '',
        preferred: true

const compile = require('virginity-ts').compile; // JavaScript
import { compile } from 'virginity-ts'; // TypeScript


See the examples folder for another example. Details on how to format the data object are included in docs/.