Checks if a condition is fulfilled
 (result is not nil or false)
772626
def condition_fulfilled?(model, condition, options)
      case condition
      when Symbol
        result = model.send(condition)
      when Proc
        result = call_proc(condition, model, options)
      end
      !!result
    end
47384
def check_exists(required, input)
      required.inject(true) do |result, key|
        input[key] && result
      end
    end
413423
def fulfill(self, value):
        

        assert self._state==self.PENDING

        self._state=self.FULFILLED;
        self.value = value
        for callback in self._callbacks:
            try:
                callback(value)
            except Exception:
                # Ignore errors in callbacks
                pass
        # We will never call these callbacks again, so allow
        # them to be garbage collected.  This is important since
        # they probably include closures which are binding variables
        # that might otherwise be garbage collected.
        self._callbacks = []
996285
def blank?(str)
      str.nil? or (str.is_a? String and str.strip.empty?)
    end
509675
def _check_fulfilled(self):
        
        is_fulfilled = False
        result = None
        start_time = time.time()

        # Check whether the promise has been fulfilled until we run out of time or attempts
        while self._has_time_left(start_time) and self._has_more_tries():

            # Keep track of how many attempts we've made so far
            self._num_tries += 1

            is_fulfilled, result = self._check_func()

            # If the promise is satisfied, then continue execution
            if is_fulfilled:
                break

            # Delay between checks
            time.sleep(self._try_interval)

        return is_fulfilled, result
1201465
public boolean hasNext() {
        // check if we already fetched next item
        if (next != null) {
            return true;
        }

        // check if result set already finished
        if (resultSetFinished) {
            return false;
        }

        // now fetch next item
        next = safeReadNext();

        // check if we got something
        if (next != null) {
            return true;
        }

        // no more items
        resultSetFinished = true;

        return false;
    }
1356227
function _initComplete(err, result) {
          if( !isResolved ) {
            isResolved = true;
            if( err ) { def.reject(err); }
            else { def.resolve(result); }
          }
        }
388138
def blank?(value)
      if value.kind_of?(NilClass)
        true
      elsif value.kind_of?(String)
        value !~ /\S/
      else
        value.respond_to?(:empty?) ? value.empty? : !value
      end
    end
961636
def action_is_satisfied(action):
    ''' 
    '''
    num_consumed_args = _num_consumed_args.get(action, 0)

    if action.nargs in [OPTIONAL, ZERO_OR_MORE, REMAINDER]:
        return True
    if action.nargs == ONE_OR_MORE:
        return num_consumed_args >= 1
    if action.nargs == PARSER:
        # Not sure what this should be, but this previously always returned False
        # so at least this won't break anything that wasn't already broken.
        return False
    if action.nargs is None:
        return num_consumed_args == 1

    assert isinstance(action.nargs, int), 'failed to handle a possible nargs value: %r' % action.nargs
    return num_consumed_args == action.nargs
626901
def satisfies?(target)
      target = Version.coerce(target)

      if !version.zero? && greedy_match?(target)
        return false
      end

      OPERATORS[operator].call(self, target)
    end
809575
function () {
        var pending = this._pending,
            done = this._done,
            a,
            b;
        while (0 !== pending.length) {
            b = pending.pop();
            a = pending.pop();
            done.push(a, b);
            if (this._areDifferent(a, b)) {
                return false;
            }
        }
        return true;
    }
856622
def is_empty(self):
        '''
        
        '''
        return (self.is_valid() and
            not self.simple_lookups and
            not self.complex_conditions and
            not self.extra_conditions)
576364
public boolean isFinished() {
    // If we have a HandshakeResult, we are done.
    if (result != null) {
      return true;
    }
    // If we have an error status, we are done.
    if (status != null && status.getCode() != Status.Code.OK.value()) {
      return true;
    }
    return false;
  }
886582
def check_condition(condition, caller)
      Watir.logger.debug "<- `Verifying precondition #{inspect}##{condition} for #{caller}`"
      begin
        condition.nil? ? assert_exists : send(condition)
        Watir.logger.debug "<- `Verified precondition #{inspect}##{condition || 'assert_exists'}`"
      rescue unknown_exception
        raise unless condition.nil?

        Watir.logger.debug "<- `Unable to satisfy precondition #{inspect}##{condition}`"
        check_condition(:wait_for_exists, caller)
      end
    end
623560
def isready(self, obj) -> bool:
        """"""
        return vars(obj).get(self.name, False)
1029230
def value?(value)
      value = Erlang.from(value)
      each { |k,v| return true if value == v }
      return false
    end
604660
def confirm?(msg)
      return true if options[:yes]
      unless STDOUT.isatty
        say(msg)
        return false
      end
      yes?(msg)
    end