promeso.js
function reject(promise, reason) {
    if (promise.state !== PENDING) return;

    promise.reason = reason;
    promise.state = REJECTED;

    return resolve(promise);
  }
function reject(promise, reason) {
    if (promise.state !== PENDING) return;

    promise.reason = reason;
    promise.state = REJECTED;

    return resolve(promise);
  }
function reject ( promise , reason ) { if ( promise . state !== PENDING ) return ; promise . reason = reason ; promise . state = REJECTED ; return resolve ( promise ) ; }
Reject a promise for the given `reason`. Returns the promise.
Reject a promise for the given reason . Returns the promise .