_computeFormDataEntry(iterator, textParts, result) {
    result = result || [];
    const item = iterator.next();
    if (item.done) {
      return Promise.resolve(result);
    }
    const entry = item.value;
    const name = entry[0];
    const value = entry[1];
    let promise;
    let isBlob = false;
    let isTextBlob = false;
    if (value instanceof Blob) {
      promise = this._blobToString(value);
      if (textParts && textParts.indexOf(name) !== -1) {
        isBlob = false;
        isTextBlob = true;
      } else {
        isBlob = true;
      }
    } else {
      promise = Promise.resolve(value);
    }
    return promise
    .then((str) => {
      const _part = {
        name: name,
        value: str,
        isFile: isBlob
      };
      if (isTextBlob) {
        _part.isTextBlob = isTextBlob;
      }
      return _part;
    })
    .then((part) => {
      result.push(part);
      return this._computeFormDataEntry(iterator, textParts, result);
    });
  }
/**
   * Recuresively iterates over form data and appends result of creating the
   * part object to the `result` array.
   *
   * Each part entry contains `name` as a form part name, value as a string
   * representation of the value and `isFile` to determine is the value is
   * acttually a string or a file data.
   *
   * @param {Iterator} iterator FormData iterator
   * @param {?Array<String>} textParts From `_arcMeta` property. List of blobs
   * that should be treated as text parts.
   * @param {?Array<Object>} result An array where the results are appended to.
   * It creates new result object when it's not passed.
   * @return {Promise} A promise resolved to the `result` array.
   */
Recuresively iterates over form data and appends result of creating the
part object to the `result` array.

Each part entry contains `name` as a form part name, value as a string
representation of the value and `isFile` to determine is the value is
acttually a string or a file data.

@param {Iterator} iterator FormData iterator
@param {?Array} textParts From `_arcMeta` property. List of blobs
that should be treated as text parts.
@param {?Array} result An array where the results are appended to.
It creates new result object when it's not passed.
@return {Promise} A promise resolved to the `result` array.
Recuresively iterates over form data and appends result of creating the part object to the ` result ` array . Each part entry contains ` name ` as a form part name value as a string representation of the value and ` isFile ` to determine is the value is acttually a string or a file data . @param { Iterator } iterator FormData iterator @param { ?Array } textParts From ` _arcMeta ` property . List of blobs that should be treated as text parts . @param { ?Array } result An array where the results are appended to . It creates new result object when it ' s not passed . @return { Promise } A promise resolved to the ` result ` array .
_computeFormDataEntry(iterator, textParts, result) {
    result = result || [];
    const item = iterator.next();
    if (item.done) {
      return Promise.resolve(result);
    }
    const entry = item.value;
    const name = entry[0];
    const value = entry[1];
    let promise;
    let isBlob = false;
    let isTextBlob = false;
    if (value instanceof Blob) {
      promise = this._blobToString(value);
      if (textParts && textParts.indexOf(name) !== -1) {
        isBlob = false;
        isTextBlob = true;
      } else {
        isBlob = true;
      }
    } else {
      promise = Promise.resolve(value);
    }
    return promise
    .then((str) => {
      const _part = {
        name: name,
        value: str,
        isFile: isBlob
      };
      if (isTextBlob) {
        _part.isTextBlob = isTextBlob;
      }
      return _part;
    })
    .then((part) => {
      result.push(part);
      return this._computeFormDataEntry(iterator, textParts, result);
    });
  }
_computeFormDataEntry ( iterator , textParts , result ) { result = result || [ ] ; const item = iterator . next ( ) ; if ( item . done ) { return Promise . resolve ( result ) ; } const entry = item . value ; const name = entry [ 0 ] ; const value = entry [ 1 ] ; let promise ; let isBlob = false ; let isTextBlob = false ; if ( value instanceof Blob ) { promise = this . _blobToString ( value ) ; if ( textParts && textParts . indexOf ( name ) !== - 1 ) { isBlob = false ; isTextBlob = true ; } else { isBlob = true ; } } else { promise = Promise . resolve ( value ) ; } return promise . then ( ( str ) => { const _part = { name : name , value : str , isFile : isBlob } ; if ( isTextBlob ) { _part . isTextBlob = isTextBlob ; } return _part ; } ) . then ( ( part ) => { result . push ( part ) ; return this . _computeFormDataEntry ( iterator , textParts , result ) ; } ) ; }
Recuresively iterates over form data and appends result of creating the
 part object to the `result` array.
Recuresively iterates over form data and appends result of creating the part object to the ` result ` array .