lib/storymock.js
function reject(err, async) {
    err = toErr(err);
    if (async) {
        return Promise.reject(err);
    } else {
        throw err;
    }
}
function reject(err, async) {
    err = toErr(err);
    if (async) {
        return Promise.reject(err);
    } else {
        throw err;
    }
}
function reject ( err , async ) { err = toErr ( err ) ; if ( async ) { return Promise . reject ( err ) ; } else { throw err ; } }
Reject with the given error. Returns a rejected promise if async, throws otherwise.
Reject with the given error . Returns a rejected promise if async throws otherwise .