build/bundle.js
/**
   *
   *
   * @param {Object} file - Javascript object containing file properties
   * @returns {Object} response - JSON content of the read file
   *
   * @memberOf InvertedIndex
   */
@param {Object} file - Javascript object containing file properties
@returns {Object} response - JSON content of the read file


@param { Object } file - Javascript object containing file properties @returns { Object } response - JSON content of the read file
static readFile(file) {
    let fileContent;
    return new Promise((resolve, reject) => {
      try {
        const reader = new FileReader();
        reader.onload = (event) => {
          fileContent = JSON.parse(event.target.result);
          const response = InvertedIndex.validateFile(fileContent);
          resolve(response);
        };
        reader.readAsText(file);
      } catch (err) {
        reject(err);
      }
    });
  }
static readFile ( file ) { let fileContent ; return new Promise ( ( resolve , reject ) => { try { const reader = new FileReader ( ) ; reader . onload = ( event ) => { fileContent = JSON . parse ( event . target . result ) ; const response = InvertedIndex . validateFile ( fileContent ) ; resolve ( response ) ; } ; reader . readAsText ( file ) ; } catch ( err ) { reject ( err ) ; } } ) ; }
@param {Object} file - Javascript object containing file properties
 @returns {Object} response - JSON content of the read file
@param { Object } file - Javascript object containing file properties @returns { Object } response - JSON content of the read file