lib/components/bridge-store.js
function(d, err, result) {
    if (err) {
        d.reject(err);
    }
    else {
        d.resolve(result);
    }
}
function(d, err, result) {
    if (err) {
        d.reject(err);
    }
    else {
        d.resolve(result);
    }
}
function ( d , err , result ) { if ( err ) { d . reject ( err ) ; } else { d . resolve ( result ) ; } }
wrapper to use promises
wrapper to use promises