tests whether a given object is a Collection.

@param {object} object to check.
@return {boolean} whether object is a Collection.
495671
function isCollection(object) {
    if (!object || typeof object !== 'object') {
        return false;
    }
    else if ('isCollection' in object) {
        diag.debug.assert(function () { return object.isCollection === Collection.prototype.isPrototypeOf(object); });
        return object.isCollection;
    }
    else {
        return Collection.prototype.isPrototypeOf(object);
    }
}
1262816
def is_nested_object(obj):
    

    if isinstance(obj, ABCSeries) and is_object_dtype(obj):

        if any(isinstance(v, ABCSeries) for v in obj.values):
            return True

    return False
679333
function enumerate(collection) {
    if (isObject(collection)) {
        if (collection instanceof Map) {
            return enumerateMap(collection)
        } else if (isIterable(collection)) {
            return enumerateIterable(collection)
        } else {
            return enumerateObject(collection)
        }
    } else {
        throw new TypeError("Object cannot be enumerated")
    }
}
576150
function (collection, callback) {
        var index,
            iterable = collection,
            result = iterable;

        if (!iterable) {
            return result;
        }

        if (!sofa.Util.objectTypes[typeof iterable]) {
            return result;
        }

        for (index in iterable) {
            if (Object.prototype.hasOwnProperty.call(iterable, index)) {
                if (callback(iterable[index], index, collection) === false) {
                    return result;
                }
            }
        }
        return result;
    }
68152
function isPlainObject(obj) {
    return (
        typeof obj === 'object' &&
        obj !== null &&
        obj.constructor === Object &&
        Object.prototype.toString.call(obj) === '[object Object]'
    );
}
552936
function (obj) {
        return Boolean(obj) && ((obj instanceof Item) ||
            _.inSuperChain(obj.constructor, '_postman_propertyName', Item._postman_propertyName));
    }
648496
function is(obj, type) {
      if (!type) {
        return obj !== undefined;
      }

      if (type == 'array' && Arr.isArray(obj)) {
        return true;
      }

      return typeof obj == type;
    }
118149
function isValueObject(obj) {
	return (obj instanceof Number) || (obj instanceof String) || (obj instanceof Boolean) || (obj === null);
}
669411
function (object) {
            var result = [],
                key;
            for (key in object) {
                if (object.hasOwnProperty(key)) {
                    result.push(key);
                }
            }
            return result;
        }
1295592
function (obj) {
        return Boolean(obj) && ((obj instanceof PropertyList) ||
            _.inSuperChain(obj.constructor, '_postman_propertyName', PropertyList._postman_propertyName));
    }
1217063
function isInstance (obj, type) {
  return obj instanceof type ||
    (obj != null && obj.constructor != null && obj.constructor.name != null &&
      obj.constructor.name === type.name)
}
285818
public static boolean isObject( Object obj ) {
      return !isNumber( obj ) && !isString( obj ) && !isBoolean( obj ) && !isArray( obj )
            && !isFunction( obj ) || isNull( obj );
   }
949544
function filter(object, callback) {
		if (!object) { return true; }
		if (object.filter) { return object.filter(callback); }
		if (object instanceof Array) {
			var result = [],
				length	= array ? array.length : 0;
			for(var index = 0; index < length; index++) {
				if (callback(array[index], index)) {
					result.push(array[index]);
				}
			}
		}else{
			var result = {};
			for(var key in object) {
				if (!object.hasOwnProperty(key)) { continue; }
				if (callback(object[key], key)) {
					result[key] = object[key];
				}
			}
		}
		return false;
	}
318284
def as_set(obj):
    
    if obj is None or isinstance(obj, collections.Set):
        return obj

    if not isinstance(obj, collections.Iterable):
        return set((obj,))
    else:
        return set(obj)
1351686
private boolean isCollection(Class<?> rawType) {

    // this sucks... is there really no way to work around this in GWT?
    // http://code.google.com/p/google-web-toolkit/issues/detail?id=4663
    if (rawType == Collection.class) {
      return true;
    }
    if (rawType == List.class) {
      return true;
    }
    if (rawType == Set.class) {
      return true;
    }
    Class<?> superType = rawType;
    while (superType != null) {
      if (superType == AbstractCollection.class) {
        return true;
      }
      superType = superType.getSuperclass();
    }
    return false;
  }
175692
function (object, callback) {
                var list;
                if (object instanceof List) {
                    list = object;
                } else if (object instanceof Array) {
                    list = new List(object);
                } else {
                    list = new List([object]);
                }

                if (list.size()) {
                    var element = list.at(0);
                    var objectType = this.getObjectTypeIdForElement(element);
                    if (!objectType) {
                        callback("Couldn't find label object type for " + element.prototype.constructor.name);
                        return;
                    }
                    var query = new Query().in("objectIds", list.toArray(function (object) {
                        return object && object.identifier();
                    })).in('objectTypeId', [objectType]);


                    var labels = this.$.dataSource.createCollection(Collection.of(Label)).query(query);

                    labels.fetch({fullData: true}, callback);
                } else {
                    callback && callback();
                }
            }
1310895
function isEmptyObject(obj) {
    if (obj === null) {
        return true;
    }
    if (!isObject(obj)) {
        return false;
    }

    for (var key in obj) {
        if (obj.hasOwnProperty(key) && obj[key]) {
            return false;
        }
    }

    return true;
}