vcard-linkedin-parser

Parse vCard LinkedIn into JSON format

Usage no npm install needed!

<script type="module">
  import vcardLinkedinParser from 'https://cdn.skypack.dev/vcard-linkedin-parser';
</script>

README

Build Status codecov.io Dependency Status devDependency Status

vcard-linkedin-parser

Why

LinkedIn give you the choice to export your contacts using the vCard format (see https://www.linkedin.com/people/export-settings). However if you need to do some data manipulation with javascript it is easier to use a json format.

this module will convert a vcard LinkedIn format string to a json format.

What

LinkedIn vcard format example:

BEGIN:VCARD
VERSION:2.1
N:Nash;John
FN:John Nash
TITLE:Mathematician
ORG:Game theory
EMAIL;INTERNET:john.nash@.gametheory.co.uk
END:VCARD
.
.
.

where:

  • N: are the name
  • FN: is the formated name
  • TITLE: is the Linkedin headline
  • ORG: is the current organization
  • EMAIL;INTERNET: is the email

This will be converted to an array of objects:

[
  {
    names: ["Nash", "John"],
    fullname: "John Nash",
    headline: "Mathematician",
    org: "Game theory",
    email: "john.nash@.gametheory.co.uk"
  },
  .
  .
  .
]

How

npm install vcard-linkedin-parser --save

Then in your scripts

var fs = require('fs');
var vcard_linkedin_parser = require('vcard-linkedin-parser');

var myVcardFile = fs.readFileSync('urlOfMyFile', 'utf-8');
var myJsonContacts = vcard_linkedin_parser(myVcardFile);
console.log(myJsonContacts);

Any questions?

Submit an issue: https://github.com/akitten/vcard-linkedin-parser/issues