app/util/cloudantDb.js
/**
   * Retrieves all data in the cloudant DB
   * @returns {promise} - A promise representing the query to the DB
   */
Retrieves all data in the cloudant DB
@returns {promise} - A promise representing the query to the DB
Retrieves all data in the cloudant DB @returns { promise } - A promise representing the query to the DB
search() {
    return new Promise((resolve, reject) => {
      db.list({ include_docs: true }, (err, result) => {
        if (err) {
          reject(err);
        } else {
          resolve(result.rows);
        }
      });
    });
  }
search ( ) { return new Promise ( ( resolve , reject ) => { db . list ( { include_docs : true } , ( err , result ) => { if ( err ) { reject ( err ) ; } else { resolve ( result . rows ) ; } } ) ; } ) ; }
Retrieves all data in the cloudant DB
 @returns {promise} - A promise representing the query to the DB
Retrieves all data in the cloudant DB @returns { promise } - A promise representing the query to the DB