Ensures :attr:`subject` is an object of class *prototype*.
766490
def is_a(self, prototype):
        
        self._run(unittest_case.assertIsInstance, (self._subject, prototype))
        if hasattr(self._subject, '__iter__'):
            return IterableInspector(self._subject)
        else:
            return ReferenceInspector(self._subject)
284679
function is( instance, Class ) {
		switch ( typeof Class ) {
			case 'function' : return instance instanceof Class;
			case 'string'   : return ( Class = get( Class ) ) ? ( instance instanceof Class ) : false;
		}
		return false;
	}
508342
def is_an_iterable_of(self, prototype):
        
        for element in self._subject:
            self._run(unittest_case.assertIsInstance, (element, prototype))
        if isinstance(self._subject, Mapping):
            return MappingInspector(self._subject)
333689
def is_false(self):
        
        self._run(unittest_case.assertFalse, (self._subject,))
        return ChainInspector(self._subject)
152640
def make_prototype_request(*args, **kwargs):
    """"""
    if args and inspect.isclass(args[0]) and issubclass(args[0], Request):
        request_cls, arg_list = args[0], args[1:]
        return request_cls(*arg_list, **kwargs)
    if args and isinstance(args[0], Request):
        if args[1:] or kwargs:
            raise_args_err("can't interpret args")
        return args[0]

    # Match any opcode.
    return Request(*args, **kwargs)
512536
function(name, prototype, base) {
      // require an object
      var source = prototype[name] || {};
      // chain inherited properties onto a new object
      prototype[name] = this.chainObject(source, base[name]);
    }
1021873
def with_subject(self, subject):
        
        return self.__class__(
            self._signer,
            service_account_email=self._service_account_email,
            scopes=self._scopes,
            token_uri=self._token_uri,
            subject=subject,
            project_id=self._project_id,
            additional_claims=self._additional_claims.copy())
1157190
def raise_error(subject, error_class):
    '''
    
    '''
    description = 'Expect {} to be raised'.format(error_class.__name__)
    try:
        subject()
        return (False, description)
    except error_class:
        return (True, description)
949947
def normalizeInternalObjectType(value, cls, name):
    
    if not isinstance(value, cls):
        raise TypeError("%s must be a %s instance, not %s."
                        % (name, name, type(value).__name__))
    return value
1064608
function object(a) {
    if(Object.prototype.toString.call(a) === '[object Array]') {
        return false;
    }

    return a !== null && typeof a === 'object';
}
226217
function isClass(clazz) {
    return isFunction(clazz) && (clazz.prototype && clazz === clazz.prototype.constructor);
  }
1076698
function getDetailedObjectType(thing) {
  let prototype = Object.getPrototypeOf(thing)

  if (!prototype) return NO_PROTOTYPE

  return Object.getPrototypeOf(prototype)
    ? COMPLEX_OBJECT
    : PLAIN_OBJECT
}
1189481
def _issubclass(sub, sup):
    '''
    '''
    if sup is not object:
        try:
            return issubclass(sub, sup)
        except TypeError:
            pass
    return False
1077526
function(cls,superClass) {
    cls.super_ = superClass;
    cls.prototype = Object.create(superClass.prototype,{
      constructor: {
        value: cls,
        writable: true,
        enumerable: false,
        configurable: true,
      },
    });
  }
1265281
def is_none(self):
        
        self._run(unittest_case.assertIsNone, (self._subject,))
        return ChainInspector(self._subject)
328107
function isPlainObject(payload) {
    if (getType(payload) !== 'Object')
        return false;
    return (payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype);
}
622018
function expectOne(obj, type) {
	if (obj === undefined)
		return (type == 'undefined');
	else if (obj === null)
		return (type == 'null');
	else if (obj.__proto__ === undefined)
		return (type == 'no prototype')
	else if (obj.constructor.name != type)
		return false;
	else
		return true;
}