code: function(predicate, asyncFunction) {
        if (predicate()) {
          return asyncFunction().then(function() {
            return Parse.Promise._continueWhile(predicate, asyncFunction);
          });
        }
        return Parse.Promise.as();
      }
docs: Runs the given asyncFunction repeatedly, as long as the predicate
  function returns a truthy value. Stops repeating if asyncFunction returns
  a rejected promise.
  @param {Function} predicate should return false when ready to stop.
  @param {Function} asyncFunction should return a Promise.