promisify() {
    return new Promise((resolve, reject) => {
      this.cursor.onsuccess = event => {
        if (event.target.result) {
          if (this.callback) this.callback(event.target.result);
        } else {
          resolve(event.target.result);
        }
      };

      this.cursor.onerror = event => {
        reject(event.target);
      };
    });
  }
/**
   * [promisify turns the IDBCursor into a promise]
   * @return {Promise} [Promise that resolves when cursor has no more records or rejects on error]
   */
[promisify turns the IDBCursor into a promise]
@return {Promise} [Promise that resolves when cursor has no more records or rejects on error]
[ promisify turns the IDBCursor into a promise ] @return { Promise } [ Promise that resolves when cursor has no more records or rejects on error ]
promisify() {
    return new Promise((resolve, reject) => {
      this.cursor.onsuccess = event => {
        if (event.target.result) {
          if (this.callback) this.callback(event.target.result);
        } else {
          resolve(event.target.result);
        }
      };
      this.cursor.onerror = event => {
        reject(event.target);
      };
    });
  }
promisify ( ) { return new Promise ( ( resolve , reject ) => { this . cursor . onsuccess = event => { if ( event . target . result ) { if ( this . callback ) this . callback ( event . target . result ) ; } else { resolve ( event . target . result ) ; } } ; this . cursor . onerror = event => { reject ( event . target ) ; } ; } ) ; }
[promisify turns the IDBCursor into a promise]
 @return {Promise} [Promise that resolves when cursor has no more records or rejects on error]
[ promisify turns the IDBCursor into a promise ] @return { Promise } [ Promise that resolves when cursor has no more records or rejects on error ]