Helper function to return the correct type of object
433667
def _create_minion_object(self, opts, timeout, safe,
                              io_loop=None, loaded_base_name=None,
                              jid_queue=None):
        '''
        
        '''
        return Minion(opts,
                      timeout,
                      safe,
                      io_loop=io_loop,
                      loaded_base_name=loaded_base_name,
                      jid_queue=jid_queue)
985781
def ensure_object(self, object_type):
        
        rv = self.find_object(object_type)
        if rv is None:
            self.obj = rv = object_type()
        return rv
96353
function(start, value, type) {
			var obj = {
				start: start || 0,
				value: value || '',
				type: type
			};
			
			obj.end = obj.start + obj.value.length;
			return obj;
		}
351253
function getcontenttype (obj) {
  var header

  if (typeof obj.getHeader === 'function') {
    // res-like
    header = obj.getHeader('content-type')
  } else if (typeof obj.headers === 'object') {
    // req-like
    header = obj.headers && obj.headers['content-type']
  }

  if (typeof header !== 'string') {
    throw new TypeError('content-type header is missing from object')
  }

  return header
}
687391
function getType(value) {
  if (Array.isArray(value)) {
    return 'array';
  } else if (value === null) {
    return 'null';
  }
  return typeof value === 'undefined' ? 'undefined' : _typeof(value);
}
38311
function(bool_return_object) {
                    var obj = { __joii_type: this.__joii__.name };

                    for (var key in this.__joii__.metadata) {
                        var val = this.__joii__.metadata[key];

                        if (val.serializable) {
                            
                            var getter_name = JOII.GenerateGetterName(val);
                            var currentValue = null;
                            if (typeof (this[getter_name]) === 'function') {
                                // use getter if it exists. This allows custom getters to translate the data properly if needed.
                                currentValue = this[getter_name]();
                            } else {
                                currentValue = this[val.name];
                            }

                            if (!val.is_enum && typeof (currentValue) === 'object' && currentValue !== null) {
                                if ('serialize' in currentValue) {
                                    obj[val.name] = currentValue.serialize(true);
                                } else {
                                    obj[val.name] = JOII.Compat.flattenObject(currentValue);
                                }
                            } else {
                                obj[val.name] = currentValue;
                            }
                        }
                    }

                    return obj;
                }
432431
function getType(type, len, name) {

                if(!type) return undefined;
                type = type.split('(')[0];

                if(map[type]){
                    var tmp = map[type];
                    if(len && !_.contains([255, 11], len)) len = '(' + len + ')';
                    else len = '';
                    type = tmp.replace('[LEN]', len);
                }

                return type;
            }
1252305
function getType(variable) {
        var types = {
            'undefined': 'undefined',
            'number': 'number',
            'boolean': 'boolean',
            'string': 'string',
            '[object Function]': 'function',
            '[object RegExp]': 'regexp',
            '[object Array]': 'array',
            '[object Date]': 'date',
            '[object Error]': 'error'
        };

        return types[typeof variable === 'undefined' ? 'undefined' : _typeof(variable)] || types[{}.toString.call(variable)] || (variable ? 'object' : 'null');
    }
624303
def _return_object(self, container, item_name):
        """"""
        coll = container.get_collection()
        for item in coll:
            if item.name == item_name:
                return item
1211449
def getitem(self, obj, argument):
        """"""
        try:
            return obj[argument]
        except (TypeError, LookupError):
            if isinstance(argument, basestring):
                try:
                    attr = str(argument)
                except:
                    pass
                else:
                    try:
                        value = getattr(obj, attr)
                    except AttributeError:
                        pass
                    else:
                        if self.is_safe_attribute(obj, argument, value):
                            return value
                        return self.unsafe_undefined(obj, argument)
        return self.undefined(obj=obj, name=argument)
1232556
def match_type?(object)
            result = object.kind_of_any? self.type_classes
            if not result
                result = object.type_of_any? self.type_types
            end
            
            return result
        end
1200322
function getType (obj) {
  if (obj === null) {
    return '' + obj
  }
  if (isSymbol(obj)) {
    return 'symbol'
  }
  if (isDate(obj)) {
    return 'date'
  }
  if (isArray(obj)) {
    return 'array'
  }
  if (isRegExp(obj)) {
    return 'regexp'
  }
  if (isError(obj)) {
    return 'error'
  }
  return typeof obj
}
458064
function getType(obj) {
  if (obj === null) return 'null';
  if (typeof obj === undefined) return 'undefined';

  return Object.prototype.toString.call(obj)
          .match(/\s([a-zA-Z]+)/)[1]
          .toLowerCase();
}
743093
def return_type(self):
        
        returns = self.returns
        if returns:
            return [r.type for r in returns]
        return None
1076698
function getDetailedObjectType(thing) {
  let prototype = Object.getPrototypeOf(thing)

  if (!prototype) return NO_PROTOTYPE

  return Object.getPrototypeOf(prototype)
    ? COMPLEX_OBJECT
    : PLAIN_OBJECT
}
131693
def _get_object(data, position, obj_end, opts, dummy):
    """"""
    obj_size, end = _get_object_size(data, position, obj_end)
    if _raw_document_class(opts.document_class):
        return (opts.document_class(data[position:end + 1], opts),
                position + obj_size)

    obj = _elements_to_dict(data, position + 4, end, opts)

    position += obj_size
    if "$ref" in obj:
        return (DBRef(obj.pop("$ref"), obj.pop("$id", None),
                      obj.pop("$db", None), obj), position)
    return obj, position
1209140
function objType(obj) {
  var type = typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
  if (type === 'undefined') return 'undefined';else if (type === 'string' || obj instanceof String) return 'string';else if (type === 'number' || obj instanceof Number) return 'number';else if (type === 'function' || obj instanceof Function) return 'function';else if (!!obj && obj.constructor === Array) return 'array';else if (obj && obj.nodeType === 1) return 'element';else if (type === 'object') return 'object';else return 'unknown';
}