@guntur/google-contact

Create and export google contact to CSV or JSON

Usage no npm install needed!

<script type="module">
  import gunturGoogleContact from 'https://cdn.skypack.dev/@guntur/google-contact';
</script>

README

google-contact

Build Status npm node

Create and export google contact to CSV or JSON


Install

$ npm install @guntur/google-contact

Usage

const googleContact = require('@guntur/google-contact');

const person = googleContact.create({
    name: 'John Doe',
    givenName: 'John Doe'
    phone: [
        {
            type: 'Mobile',
            value: '+0000123456789'
        }
    ]
});

console.log(person);
/*
{
    'Name': 'John Doe',
    'Given Name': 'John Doe',
    ...
    'Phone 1 - Type': 'Mobile',
    'Phone 1 - Value': '+0000123456789',
    ...
}
*/

API

googleContact

.create(options: object)

  • Params:
    • options: <object> - (required). See state file for all options.
  • Returns: <object>

.export.toCSV(options: object)

.export.toJSON(options: object)

  • Params:
    • options: <object> - (required)
      • contacts: <object[]>
      • outputFilepath: <string>
  • Returns: void

License

MIT © Guntur Poetra