async deblob(data, pFunction) {
        const outputBlobs = {};
        const outputData = this.walk(data, (key, value) => {
            if (typeof value === 'string') {
                const type = this.getSignatureType(value);
                if (type !== '') {
                    const blob = this.imageDataToBinary(value);
                    const hash = crypto.createHash('MD5').update(blob).digest('hex');
                    outputBlobs[hash + '.' + type] = blob;
                    return hash + '.' + type;
                }
            }
            return value;
        });
        if (!!pFunction) {
            await pFunction(outputBlobs);
        }
        return outputData;
    }
/**
     * The function will extract base64 encoded image data blobs inside the given JSON.
     * an asynchronous function will be called back to deal with blobs
     * @param data
     * @param pFunction
     */
The function will extract base64 encoded image data blobs inside the given JSON.
an asynchronous function will be called back to deal with blobs
@param data
@param pFunction
The function will extract base64 encoded image data blobs inside the given JSON . an asynchronous function will be called back to deal with blobs @param data @param pFunction
async deblob(data, pFunction) {
        const outputBlobs = {};
        const outputData = this.walk(data, (key, value) => {
            if (typeof value === 'string') {
                const type = this.getSignatureType(value);
                if (type !== '') {
                    const blob = this.imageDataToBinary(value);
                    const hash = crypto.createHash('MD5').update(blob).digest('hex');
                    outputBlobs[hash + '.' + type] = blob;
                    return hash + '.' + type;
                }
            }
            return value;
        });
        if (!!pFunction) {
            await pFunction(outputBlobs);
        }
        return outputData;
    }
async deblob ( data , pFunction ) { const outputBlobs = { } ; const outputData = this . walk ( data , ( key , value ) => { if ( typeof value === 'string' ) { const type = this . getSignatureType ( value ) ; if ( type !== '' ) { const blob = this . imageDataToBinary ( value ) ; const hash = crypto . createHash ( 'MD5' ) . update ( blob ) . digest ( 'hex' ) ; outputBlobs [ hash + '.' + type ] = blob ; return hash + '.' + type ; } } return value ; } ) ; if ( ! ! pFunction ) { await pFunction ( outputBlobs ) ; } return outputData ; }
The function will extract base64 encoded image data blobs inside the given JSON.
The function will extract base64 encoded image data blobs inside the given JSON .