Returns boolean indicating whether the custom function returns true.

@param ctx - Koa context
@param opts - unless configuration
@returns {boolean}
7252
function matchesCustom(ctx, opts) {
  if (opts.custom) {
    return opts.custom.call(ctx);
  }
  return false;
}
581513
public static boolean optBoolean(JSONObject object, String key)
    {
        return !object.isNull(key) && object.getBoolean(key);
    }
330889
function (cols, term, opts) {
            opts = opts || {};
            return format("MATCH %s AGAINST (%s%s)", this.literal(toArray(cols)),
                this.literal(toArray(term).join(" ")), opts.boolean ? " IN BOOLEAN MODE" : "");
        }
1218735
function compiler(parsed, opts) {
  options = opts;
  const compiled = compile(parsed);

  return t.functionDeclaration(c.COMPILED, c.runtimeParams, t.blockStatement([
    t.returnStatement(ConcatStringList(compiled)),
  ]));
}
622175
function(opts) {
  this._emitter = new events.EventEmitter();
  this._libpath = opts.path;
  this._tox = opts.tox;
  this._library = this.createLibrary(this._libpath);
  this._initCallbacks();
}
1329799
function Root(body,opts){
	this._traversed = false;
	this._body = AST.blk(body);
	this._scope = new RootScope(this,null);
	this._options = {};
}
1325295
def get_opt( self, opt):
    
    if self.__options.has_key(opt):
      return self.__options[opt]
    return None
520494
function isSelectionInList(
    opts: Options,
    value: Value,
    type?: string
): boolean {
    const items = getItemsAtRange(opts, value);
    return (
        !items.isEmpty() &&
        // Check the type of the list if needed
        (!type ||
            getListForItem(opts, value, items.first()).get('type') === type)
    );
}
42872
function isSpecs(opt) {
    //logger.debug('???');
    //logger.debug(`${opt.cacheDir}`);
    //let b:any = opt.cacheDir instanceof(String)
    if (!path.isAbsolute(opt.cacheDir)) {
        logger.error('cacheDir parameter must be an absolute path');
        return false;
    }
    if ('cacheDir' in opt && 'tcp' in opt && 'port' in opt && 'engineSpec' in opt)
        return typeof (opt.cacheDir) == 'string' && typeof (opt.tcp) == 'string' &&
            typeof (opt.port) == 'number' && engineLib.isEngineSpec(opt.engineSpec);
    //logger.debug('niet');
    return false;
}
294604
function checkOptions(opts1, opts2) {
        for (var prop in opts1) {
            if (opts1.hasOwnProperty(prop)) {
                if (opts1[prop] !== opts2[prop]) {
                    return true;
                }
            }
        }
        return false;
    }
1248856
function(opts) {
  opts = opts || {};
  this.userHandshake = opts.handshake;

  if(opts.heartbeat) {
    this.heartbeatSec = opts.heartbeat;
    this.heartbeat = opts.heartbeat * 1000;
  }

  this.checkClient = opts.checkClient;

  this.useDict = opts.useDict;
  this.useProtobuf = opts.useProtobuf;
  this.useCrypto = opts.useCrypto;
}
980756
function(opts) {
  if(!opts) opts = {};
  if(!opts.clientId  || typeof opts.clientId !== 'string') {
    throw new Error('Invalid or missing clientId');
  } else {
    this.clientId = opts.clientId;
  }
  if(!opts.clientSecret || typeof opts.clientSecret !== 'string') {
    throw new Error('Invalid or missing clientSecret');
  } else {
    this.clientSecret = opts.clientSecret;
  }
  if(!opts.redirectUri || typeof opts.redirectUri !== 'string') {
    throw new Error('Invalid or missing redirectUri');
  } else {
    this.redirectUri = opts.redirectUri;
  }
  // Allow custom login and test uris to be passed in
  // Addresses issue #5
  // @zachelrath 11/13/12
  opts.loginUri && (LOGIN_URI = opts.loginUri);
  opts.testLoginUri && (TEST_LOGIN_URI = opts.testLoginUri);

  if(typeof opts.cacheMetadata !== 'undefined') {
    if(typeof opts.cacheMetadata !== 'boolean') throw new Error('cacheMetadata must be a boolean');
    this.cacheMetadata = opts.cacheMetadata;
  } else {
    // caching is defaulted to false
    this.cacheMetadata = true;
  }
  if(this.cacheMetadata) {
    this._cache = {
      keyPrefixes: {},
      sObjects: {}
    }
  }
  if(opts.apiVersion) {
    if(typeof opts.apiVersion === 'number') {
      opts.apiVersion = opts.apiVersion.toString();
      if(opts.apiVersion.length === 2) opts.apiVersion = opts.apiVersion + '.0';
    }
    opts.apiVersion = opts.apiVersion.toLowerCase();
    if(/^\d\d\.\d$/g.test(opts.apiVersion)) {
      opts.apiVersion = 'v' + opts.apiVersion;
    } else if(/^\d\d$/g.test(opts.apiVersion)) {
      opts.apiVersion = 'v' + opts.apiVersion + '.0';
    } else if(/^v\d\d$/g.test(opts.apiVersion)) {
      opts.apiVersion = opts.apiVersion + '.0';
    }
    if(API_VERSIONS.indexOf(opts.apiVersion) === -1 ) {
      throw new Error(opts.apiVersion + ' is an invalid api version');
    } else {
      this.apiVersion = opts.apiVersion;
    }
  } else {
    this.apiVersion = API_VERSIONS[API_VERSIONS.length - 1];
  }
  if(opts.environment) {
    if(opts.environment.toLowerCase() == 'sandbox' || opts.environment.toLowerCase() == 'production') {
      this.environment = opts.environment.toLowerCase();
    } else {
      throw new Error(opts.environment + ' is an invalid environment');
    }
  } else {
    this.environment = 'production';
  }
  if(opts.mode && opts.mode.toLowerCase() === 'single') {
    this.mode = 'single';
  } else {
    this.mode = 'multi';
  }
}
559694
function (conn, opts) {
            opts = opts || {};
            var s = opts.prepare;
            var logConnectionExecute = comb("__logConnectionExecute");
            if (s) {
                s = this.literal(s);
                var self = this;
                return this.__logConnectionExecute(conn, "XA END " + s)
                    .chain(function () {
                        return self.__logConnectionExecute(conn, "XA PREPARE " + s);
                    })
                    .chain(function () {
                        return self.__logConnectionExecute(conn, "XA ROLLBACK " + s);
                    });
            } else {
                return this._super(arguments);
            }
        }
424273
function matchesMethod(method, opts) {
  var methods = !opts.method || Array.isArray(opts.method) ?
    opts.method : [opts.method];

  if (methods) {
    return !!~methods.indexOf(method);
  }
}
654998
function only(opts) {
        mocha.options.hasOnly = true;
        opts.isOnly = true;
        return this.create(opts);
      }
12445
function ComputedProperty(func, opts) {
  this.func = func;

  this._cacheable = (opts && opts.cacheable !== undefined) ? opts.cacheable : true;
  this._dependentKeys = opts && opts.dependentKeys;
  this._readOnly = opts && (opts.readOnly !== undefined || !!opts.readOnly);
}
1032355
function verify(pattern, opts, callback) {
  if (typeof opts === 'function') {
    callback = opts;
    opts = {};
  }
  if (typeof callback !== 'function') {
    errs.type('expect `callback` to be function');
  }
  if (typeof pattern !== 'string') {
    errs.type('expect `pattern` to be string');
  }
  if (!regex.test(pattern)) {
    errs.error('expect `pattern` to be `user/repo#branch`');
  }
  if (!isObject(opts)) {
    errs.type('expect `opts` to be object');
  }

  opts = typeof opts.token === 'string' ? {
    headers: {
      Authorization: 'token ' + opts.token
    }
  } : undefined;

  memo(regex.exec(pattern));

  if (!cache.branch) {
    errs.error('should give a branch or tag in `pattern`');
  }

  return {
    opts: opts,
    callback: callback
  }
}