Converts an object type to Factory definition
@param {*} object
193521
function processObjectType(object: GraphQLObjectType) {
  return reduce(
    object._typeConfig,
    (def, value, key) => {
      return setDef(
        def,
        key,
        value,
        [
          'description',
          'interfaces',
          'fields',
          'isTypeOf',
          'astNode',
          'onConflict',
        ],
        object,
      );
    },
    { type: 'Object' },
    true,
  );
}
1164001
function getDefineFactory(defineExpr) {

    var args = defineExpr.arguments;
    var factoryAst = args[args.length - 1];

    if (factoryAst.type === SYNTAX.FunctionExpression
        || factoryAst.type === SYNTAX.ObjectExpression
        || factoryAst.type === SYNTAX.ArrayExpression
    ) {
        return factoryAst;
    }

    return false;
}
777188
function( object ) {
		var keys = Object.keys(object), k, v,
			lVals = [], lArrays = [], lObjects = [];

		// Sort to values, arrays and objects
		var lookupString = "";
		for (var i=0; i<keys.length; ++i) {
			k = keys[i]; v = object[k];
			if ((v instanceof Uint8Array) || (v instanceof Int8Array) ||
				(v instanceof Uint16Array) || (v instanceof Int16Array) ||
				(v instanceof Uint32Array) || (v instanceof Int32Array) ||
				(v instanceof Float32Array) || (v instanceof Float64Array) ||
				(v instanceof Array) ) {
				lookupString += "@"+k;
			} else if (v.constructor === ({}).constructor) {
				lookupString += "%"+k;
			} else {
				lookupString += "$"+k;
			}
		}

		// Return lookup string
		return lookupString;
	}
708262
public static <T> T convertToGenericObject(Object object) {

        try {
            return (T) innerConvertToGenericObject(object, new IdentityHashMap<Object, Object>());
        } catch (Throwable t) {
            throw new ConvertException(t);
        }
    }
52271
function construct (constructor, args) {
  function Factory () {
    return constructor.apply(this, args);
  }

  Factory.prototype = constructor.prototype;

  return new Factory();
}
533012
public <S, T> T convertTo(Class<T> output, Object object) {
		return convertTo(output, object, DefaultBinding.class);
	}
713853
function(methods) {
    var keys = Object.keys(methods);
    var len = keys.length;
    for (var i = 0; i < len; i++) {
      var key = keys[i];
      this[key] = lib.method.createMethod(methods[key]);
    }
    return factory;
  }
375795
function createFactory() {
  return function Stamp(options) {
    var descriptor = Stamp.compose || {};
    // Next line was optimized for most JS VMs. Please, be careful here!
    var obj = {__proto__: descriptor.methods}; // jshint ignore:line

    merge(obj, descriptor.deepProperties);
    assign(obj, descriptor.properties);
    Object.defineProperties(obj, descriptor.propertyDescriptors || {});

    if (!descriptor.initializers || descriptor.initializers.length === 0) return obj;

    if (options === undefined) options = {};
    var inits = descriptor.initializers;
    var length = inits.length;
    for (var i = 0; i < length; i += 1) {
      var initializer = inits[i];
      if (isFunction(initializer)) {
        var returnedValue = initializer.call(obj, options,
          {instance: obj, stamp: Stamp, args: slice.apply(arguments)});
        obj = returnedValue === undefined ? obj : returnedValue;
      }
    }

    return obj;
  };
}
659126
function promisify_object(template, object_creator) {
    object_creator = object_creator || new_object;
    var transformer = function (obj_promise) {
        var res = object_creator(obj_promise);
        for (var prop in template) {
            res[prop] = template[prop].for_property(obj_promise, prop);
        }
        return res;
    };

    transformer.for_property = function (parent_promise, prop) {
        return transformer(when(parent_promise, function (obj) {
            return obj[prop];
        }));
    };

    return transformer;
}
1243234
private static Object toJson(Object obj, JsonBuilderFactory factory) {
		if (obj instanceof JsonObject) {
			return ((JsonObject)obj).toJson(factory.createJsonBuilder());
		} else if (obj.getClass().isArray()) {
			List<Object> r = new ArrayList<>();
			int len = Array.getLength(obj);
			for (int i = 0; i < len; ++i) {
				Object ao = Array.get(obj, i);
				r.add(toJson(ao, factory));
			}
			return r;
		} else if (obj instanceof Collection) {
			Collection<?> coll = (Collection<?>)obj;
			List<Object> r = new ArrayList<>();
			for (Object ao : coll) {
				r.add(toJson(ao, factory));
			}
			return r;
		} else if (obj instanceof Map) {
			Map<?, ?> m = (Map<?, ?>)obj;
			Map<String, Object> r = new LinkedHashMap<>();
			for (Map.Entry<?, ?> e : m.entrySet()) {
				String key = toJson(e.getKey(), factory).toString();
				Object value = toJson(e.getValue(), factory);
				r.put(key, value);
			}
			return r;
		}
		return obj;
	}
1294401
function makeProxy(object) {
    if (((typeof(object) === 'object') && (!Array.isArray(object))) ||
        (typeof(object) === 'function')) {

      /* Only non-array objects and functions get proxied */
      var proxyId = messages.addProxy(object);
      var definition = defineProxy(object);
      return { proxy: { id: proxyId, definition: definition }};

    } else {

      /* Arrays and normal objects go through as values */
      return { resolve: object };
    }
  }
645680
function clone(source) {
            if (!source || typeof source !== 'object') {
                return source;
            }

            var cloned = source;

            if (isArray(source)) {
                cloned = source.slice().map(clone);
            }
            else if (isObject(source) && 'isPrototypeOf' in source) {
                cloned = {};
                for (var key in source) {
                    if (hasOwnProperty.call(source, key)) {
                        cloned[key] = clone(source[key]);
                    }
                }
            }

            return cloned;
        }
1336434
function (object) {
            object.id = object.id || this.generateId();
            this.data.push(object);
            this.mapValues[object.id] = {};
            this.eachMap(function (map, mapName) {
                this.addObjectToMap(mapName, object);
            });
            return this;
        }
955645
function factory(BaseClass, mapFunction) {
  function subject(value) {
    if (typeof mapFunction === 'function') {
      value = mapFunction.apply(undefined, arguments);
    } else if (typeof mapFunction !== 'undefined') {
      value = mapFunction;
    }
    subject.onNext(value);
    return value;
  }
  
  for (var key in BaseClass.prototype) {
    subject[key] = BaseClass.prototype[key];
  }

  BaseClass.apply(subject, [].slice.call(arguments, 2));

  return subject;
}
921163
function toObjectExpression(object) {
    const properties = Object.keys(object).map(key => {
      return t.objectProperty(t.identifier(key), object[key]);
    });

    return t.objectExpression(properties);
  }
1138723
function toFunction(obj, couldNotCastError) {
	if (obj == null) {
		throw couldNotCastError;
	}

	var result;
	if (typeof obj === 'object') {
		if (obj.hasOwnProperty('constructor')) {
			if (obj.constructor.prototype !== obj) {
				throw couldNotCastError;
			}
			result = obj.constructor;
		} else {
			var EmptyInitialiser = function() {};
			EmptyInitialiser.prototype = obj;
			Object.defineProperty(obj, 'constructor', {
				enumerable: false, value: EmptyInitialiser
			});
			result = EmptyInitialiser;
		}
	} else if (typeof obj === 'function') {
		result = obj;
	} else {
		throw couldNotCastError;
	}
	return result;
}
78232
function isObject(obj) {
  const objType = typeof obj;
  return objType === 'object' && Boolean(obj) && !Array.isArray(obj);
}