app.js
/**
 * db_get
 * 
 * Convenience function that converts sqlite3.get to a promise.
 */


Convenience function that converts sqlite3.get to a promise.
Convenience function that converts sqlite3 . get to a promise .
function db_get(sql, params) {
  return new Promise((resolve, reject) => {
    DB.get(sql, params, (err, row) => {
      if (err) {
        reject({sql: sql.split('\n'), params: params, err: err});
      } else {
        resolve(row);
      }
    });
  });
}
function db_get ( sql , params ) { return new Promise ( ( resolve , reject ) => { DB . get ( sql , params , ( err , row ) => { if ( err ) { reject ( { sql : sql . split ( '\n' ) , params : params , err : err } ) ; } else { resolve ( row ) ; } } ) ; } ) ; }
db_get
db_get