Nonchalantly Performs Magic

    tfk-360-unwrap-contact

    3.0.1 • Public • Published

    Build Status Coverage Status Code Climate js-standard-style

    tfk-360-unwrap-contact

    Module for unwrapping a contact from Public360's GetPrivatePersonsResult

    Installation

    From npm

    $ npm install tfk-360-unwrap-contact

    From GitHub

    $ git clone git@github.com:telemark/tfk-360-unwrap-contact.git

    cd into directory and install dependencies

    $ npm install

    Usage

    Pass a result from GetPrivatePersonsResult

    const unwrapContact = require('tfk-360-unwrap-contact')
    const result = {
      GetPrivatePersonsResult: {
        Successful: true,
        PrivatePersons: {
          PrivatePersonBase: [
            {
              Email: 'xxx',
              FirstName: 'xxx',
              LastName: 'xxx',
              PersonalIdNumber: 'xxx',
              PhoneNumber: 'xxx',
                PrivateAddress: {
                  Area: '',
                  Country: 'NOR',
                  County: '',
                  State: '',
                  StreetAddress: '<HEMMELIG ADRESSE>',
                  ZipCode: '',
                  ZipPlace: ''
                }
              }
            ]
          }
        }
      }
    }
    
    const contact = unwrapContact(result)
     
    console.log(contact)

    returns

    {
      Email: 'xxx',
      FirstName: 'xxx',
      LastName: 'xxx',
      PersonalIdNumber: 'xxx',
      PhoneNumber: 'xxx',
        PrivateAddress: {
          Area: '',
          Country: 'NOR',
          County: '',
          State: '',
          StreetAddress: '<HEMMELIG ADRESSE>',
          ZipCode: '',
          ZipPlace: ''
        }
    }

    ##License

    MIT

    Install

    npm i tfk-360-unwrap-contact

    DownloadsWeekly Downloads

    35

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    11 kB

    Total Files

    14

    Last publish

    Collaborators

    • zrrrzzt
    • maccyber
    • matsand