lib/vcard.js
function( version ) {

    version = version || '4.0'

    var keys = Object.keys( this.data )
    var data = [ [ 'version', {}, 'text', version ] ]
    var prop = null

    for( var i = 0; i < keys.length; i++ ) {
      if( keys[i] === 'version' ) continue;
      prop = this.data[ keys[i] ]
      if( Array.isArray( prop ) ) {
        for( var k = 0; k < prop.length; k++ ) {
          data.push( prop[k].toJSON() )
        }
      } else {
        data.push( prop.toJSON() )
      }
    }

    return [ 'vcard', data ]

  }
function( version ) {

    version = version || '4.0'

    var keys = Object.keys( this.data )
    var data = [ [ 'version', {}, 'text', version ] ]
    var prop = null

    for( var i = 0; i < keys.length; i++ ) {
      if( keys[i] === 'version' ) continue;
      prop = this.data[ keys[i] ]
      if( Array.isArray( prop ) ) {
        for( var k = 0; k < prop.length; k++ ) {
          data.push( prop[k].toJSON() )
        }
      } else {
        data.push( prop.toJSON() )
      }
    }

    return [ 'vcard', data ]

  }
function ( version ) { version = version || '4.0' var keys = Object . keys ( this . data ) var data = [ [ 'version' , { } , 'text' , version ] ] var prop = null for ( var i = 0 ; i < keys . length ; i ++ ) { if ( keys [ i ] === 'version' ) continue ; prop = this . data [ keys [ i ] ] if ( Array . isArray ( prop ) ) { for ( var k = 0 ; k < prop . length ; k ++ ) { data . push ( prop [ k ] . toJSON ( ) ) } } else { data . push ( prop . toJSON ( ) ) } } return [ 'vcard' , data ] }
Format the card as jCard
@param {String} version='4.0'
@return {Array} jCard
Format the card as jCard