now (onresolve, onreject) {
		var iserr = this[_iserr];
		var promise;
		// Forward to then() if promise pending or reactor cancelled
		if (iserr === undefined || this[_done]) {
			return this.then(onresolve, onreject);
		}
		// Create promise
		promise = promiseme((res, rej) => {
			// Return resolved promise if not error
			if (iserr === false) {
				res(this.value);
			}
			// Return rejected promise if error
			else if (iserr === true) {
				rej(this.value);
			}
			// Just in case
			else {
				throw new Error(`Invalid Reactor state: ${iserr}`);
			}
		});
		// Add res/rej functions if given
		if (onresolve || onreject) {
			promise = promise.then(onresolve, onreject);
		}
		return promise;
	}
// Returns promise resolved/rejected with current value, or chained to existing promise if pending
Returns promise resolved/rejected with current value, or chained to existing promise if pending
Returns promise resolved / rejected with current value or chained to existing promise if pending
now (onresolve, onreject) {
		var iserr = this[_iserr];
		var promise;
		if (iserr === undefined || this[_done]) {
			return this.then(onresolve, onreject);
		}
		promise = promiseme((res, rej) => {
			if (iserr === false) {
				res(this.value);
			}
			else if (iserr === true) {
				rej(this.value);
			}
			else {
				throw new Error(`Invalid Reactor state: ${iserr}`);
			}
		});
		if (onresolve || onreject) {
			promise = promise.then(onresolve, onreject);
		}
		return promise;
	}
now ( onresolve , onreject ) { var iserr = this [ _iserr ] ; var promise ; if ( iserr === undefined || this [ _done ] ) { return this . then ( onresolve , onreject ) ; } promise = promiseme ( ( res , rej ) => { if ( iserr === false ) { res ( this . value ) ; } else if ( iserr === true ) { rej ( this . value ) ; } else { throw new Error ( ` ${ iserr } ` ) ; } } ) ; if ( onresolve || onreject ) { promise = promise . then ( onresolve , onreject ) ; } return promise ; }
Returns promise resolved/rejected with current value, or chained to existing promise if pending
Returns promise resolved / rejected with current value or chained to existing promise if pending
// Forward to then() if promise pending or reactor cancelled // Create promise // Return resolved promise if not error // Return rejected promise if error // Just in case // Add res/rej functions if given