/* if type is a fn call toString() to get type, redux-actions
if array, then check members
559100
function typeToStrFns(type) {
  if (Array.isArray(type)) { return type.map(x => typeToStrFns(x)); }
  return (typeof type === 'function') ?
    type.toString() :
    type;
}
72035
function(type, fn) {
    if (!type || (typeof type !== 'number' &&
        typeof type !== 'string')) {
      return fn('Error getting Type. You did not specify the ' +
        'type name or id number of the type you want to retrieve.');
    }

    if (typeof type === 'string') {
      type = getTypeNumberFromString(type);
    }

    type = type.toString();
    var apiCall = 'http://pokeapi.co/api/v' + defaults.version +
      '/type/' + type;

    makeTheCall(type, 'type', apiCall, function(err, data) {
      return fn(err, data);
    });
  }
313664
function isValidAction(actionString) {
	return module.exports.actions.some(foundAction => {
		return foundAction.match.test(actionString);
	});
}
261017
function transformType (type) {
  if (Array.isArray(type)) {
    return transformArray(type)
  }

  if (typeof type === 'object') {
    return transformObject(type)
  }

  if (
    typeof type === 'function' &&
    (!type.prototype || type.name === '')
  ) {
    return type
  }

  return findType(type)
}
249723
function shouldBeChecked(actionType: string): bool {
  if(actionType === LIST_ITEM_CHECK)    return true;
  if(actionType === LIST_ITEM_UNCHECK)  return false;

  throw new Error(`Invalid action type ${actionType}`);
}
647212
function (def, classpath, member) {
        var res;
        if (typeUtils.isFunction(def)) {
            // should already be normalized:
            return __simpleFunctionDefinition;
        } else if (typeUtils.isString(def)) {
            res = {
                $type : def
            };
        } else if (typeUtils.isArray(def)) {
            return __simpleArrayDefinition;
        } else if (typeUtils.isObject(def)) {
            res = def;
        } else {
            return null;
        }
        var memberType = res.$type;
        if (!__acceptedMemberTypes[memberType]) {
            // the error is logged later
            return null;
        }
        if (!(require("./JsonValidator")).normalize({
            json : res,
            beanName : "aria.core.CfgBeans.ItfMember" + memberType + "Cfg"
        })) {
            return null;
        }
        return res;
    }
423312
function type(input) {

  //If the input value is null, undefined or NaN the toStringTypes object shouldn't be used
  if (input === null || input === undefined || (input !== input && String(input) === "NaN")) {
    return String(input);
  }

  // use the typeMap to detect the type and fallback to object if the type wasn't found
  return typeMap[Object.prototype.toString.call(input)] || "object";
}
831262
function checkType(value, type) {
  if (typeof type === 'string') {
    switch (type) {
      case 'string':
      case 'object':
      case 'number':
      case 'boolean':
      case 'function':
        return typeof value === type;
      case 'class':
        return typeof value === 'function';
      case 'array':
        return value.constructor === Array;
      default:
        return false;
    }
  }
  else {
    return value instanceof type;
  }
}
1292271
function (member) {
            member = _gpfEncodeAttributeMember(member);
            var result = this._members[member];
            if (undefined === result || !(result instanceof _gpfA.Array)) {
                return _gpfEmptyMemberArray;
            }
            return result;
        }
858481
function handleActions(handlers, defaultState, ctx) {
  var reducers = (0, _keys2.default)(handlers).map(function (type) {
    return handleAction(type, handlers[type], ctx);
  });
  // 将 reducer 包装成调用链，这里有个问题：
  // 由于这个链式调用并不保障每次 reducers 对 state 进行更新时，链内只有一个 reducer 响应 actionType。
  // 导致的结果是如果有多个 reducer 对同一 actionType 进行响应的话，无法保证这些 reducers 之间的调用顺序。

  // 更新：
  // 这样做的目的是因为，一般对于同一个 actionType 允许有多个 reducer 进行响应，而这些 reducers 每个都负责维护不同的 state 结构，故当多个 reducer 对同一 actionType 进行响应时，reducers 的调用顺序无关紧要。
  var reducer = reduceReducers.apply(undefined, (0, _toConsumableArray3.default)(reducers));
  return function () {
    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
    var action = arguments[1];
    return reducer(state, action);
  };
}
1354519
function checkArrayTypes() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    var t, i;
    for (i = 0; i < arguments.length; i++) {
        if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
            throw new TypeError('unexpected type ' + t + ', use Uint8Array');
    }
}
470495
function eventCheck(obj, type) {
  var t;
  
  if (!obj._events) {
    return false;
  }
  
  t = obj._events[type]
  
  if (typeof t === 'function') {
    return true;
  }
  if (Array.isArray(t) && t.length) {
    return true;
  }
  return false;
}
897297
function isTypeOf(path, typePath) {
            var node = _getNode(path);

            if (node) {
                return state.core.isTypeOf(node, typePath);
            }

            return false;
        }
133158
function(action, thisp) {
			var is = this.initialized;
			if (arguments.length) {
				if (is) {
					action.call(thisp);
				} else {
					this._initcallbacks = this._initcallbacks || [];
					this._initcallbacks.push(function() {
						if (gui.debug) {
							try {
								action.call(thisp);
							} catch (exception) {
								console.error(action.toString());
								throw exception;
							}
						} else {
							action.call(thisp);
						}
					});
				}
			}
			return is;
		}
54028
function getAlternateTypes(method) {
          var types = [];

          function process(arr) {
            if (arr) {
              arr.forEach(function(obj) {
                if (obj.type) {
                  var split = obj.type.split('|');
                  if (split.length > 1) {
                    types = types.concat(split);
                  }
                }
              });
            }
          }

          process(method.params);
          process(method.options);

          return types;
        }
492896
function(_data,_type){
        try{
            _type = _type.toLowerCase();
            if (_data===null) return _type=='null';
            if (_data===undefined) return _type=='undefined';
            return _o.toString.call(_data).toLowerCase()=='[object '+_type+']';
        }catch(e){
            return !1;
        }
    }
801491
function(o, callback, type, visited) {
			visited = visited || {};
			for (var i in o) {
				if (o.hasOwnProperty(i)) {
					callback.call(o, i, o[i], type || i);

					if (_.util.type(o[i]) === 'Object' && !visited[_.util.objId(o[i])]) {
						visited[_.util.objId(o[i])] = true;
						_.languages.DFS(o[i], callback, null, visited);
					}
					else if (_.util.type(o[i]) === 'Array' && !visited[_.util.objId(o[i])]) {
						visited[_.util.objId(o[i])] = true;
						_.languages.DFS(o[i], callback, i, visited);
					}
				}
			}
		}