function convertCustoms(vcard = new vCard()) {
        const groups = _.groupBy(extractAll(vcard), (property) => property.getGroup() || 'nogroup');

        return _.reduce(
            Object.keys(groups),
            (acc, groupName) => {
                const group = groups[groupName];

                if (groupName === 'nogroup' || group.length === 1) {
                    _.each(group, (prop) => acc.addProperty(prop));
                    return acc;
                }

                const property1 = _.find(group, (prop) => prop.getField().toLowerCase() === 'x-ablabel');

                if (property1) {
                    const property2 = _.find(group, (prop) => prop.getField().toLowerCase() !== 'x-ablabel');
                    const key = property2.getField();
                    const value = property2.valueOf();
                    const params = property2.getParams() || {};
                    const type = property1.valueOf();

                    params.type = type;
                    acc.add(key, value, params);

                    return acc;
                }

                _.each(group, (prop) => acc.addProperty(prop));

                return acc;
            },
            new vCard()
        );
    }
/**
     * Handle x-ablabel custom property and convert it to the vCard 4 format
     * Usually, vcards coming from Apple
     * @param  {Array} vcards
     * @return {Array}
     */
Handle x-ablabel custom property and convert it to the vCard 4 format
Usually, vcards coming from Apple
@param  {Array} vcards
@return {Array}
Handle x - ablabel custom property and convert it to the vCard 4 format Usually vcards coming from Apple @param { Array } vcards @return { Array }
function convertCustoms(vcard = new vCard()) {
        const groups = _.groupBy(extractAll(vcard), (property) => property.getGroup() || 'nogroup');
        return _.reduce(
            Object.keys(groups),
            (acc, groupName) => {
                const group = groups[groupName];
                if (groupName === 'nogroup' || group.length === 1) {
                    _.each(group, (prop) => acc.addProperty(prop));
                    return acc;
                }
                const property1 = _.find(group, (prop) => prop.getField().toLowerCase() === 'x-ablabel');
                if (property1) {
                    const property2 = _.find(group, (prop) => prop.getField().toLowerCase() !== 'x-ablabel');
                    const key = property2.getField();
                    const value = property2.valueOf();
                    const params = property2.getParams() || {};
                    const type = property1.valueOf();
                    params.type = type;
                    acc.add(key, value, params);
                    return acc;
                }
                _.each(group, (prop) => acc.addProperty(prop));
                return acc;
            },
            new vCard()
        );
    }
function convertCustoms ( vcard = new vCard ( ) ) { const groups = _ . groupBy ( extractAll ( vcard ) , ( property ) => property . getGroup ( ) || 'nogroup' ) ; return _ . reduce ( Object . keys ( groups ) , ( acc , groupName ) => { const group = groups [ groupName ] ; if ( groupName === 'nogroup' || group . length === 1 ) { _ . each ( group , ( prop ) => acc . addProperty ( prop ) ) ; return acc ; } const property1 = _ . find ( group , ( prop ) => prop . getField ( ) . toLowerCase ( ) === 'x-ablabel' ) ; if ( property1 ) { const property2 = _ . find ( group , ( prop ) => prop . getField ( ) . toLowerCase ( ) !== 'x-ablabel' ) ; const key = property2 . getField ( ) ; const value = property2 . valueOf ( ) ; const params = property2 . getParams ( ) || { } ; const type = property1 . valueOf ( ) ; params . type = type ; acc . add ( key , value , params ) ; return acc ; } _ . each ( group , ( prop ) => acc . addProperty ( prop ) ) ; return acc ; } , new vCard ( ) ) ; }
Handle x-ablabel custom property and convert it to the vCard 4 format
 Usually, vcards coming from Apple
 @param  {Array} vcards
 @return {Array}
Handle x - ablabel custom property and convert it to the vCard 4 format Usually vcards coming from Apple @param { Array } vcards @return { Array }