/*
{
<functionName>: function() {}
}
517166
function (node) {
                if (node.value && node.value.type === "FunctionExpression") {
                    if (node.key && node.key.type === "Identifier") {
                        _addResult(node.key);
                    }
                }
            }
965645
function(object, methods) {
        _.each(methods, function(method, name) {
            if (!_.isFunction(method)) {
                throw new Error('Method "' + name + '" must be a function!');
            }
            object[name] = method
        });
    }
98691
function (nodeName) {
            nodeName = nodeName.toUpperCase();
            return function (node) {
                if (node !== undefined && node.nodeName !== undefined) {
                    return node && node.nodeName.toUpperCase() === nodeName;
                }
                return false;
            };
        }
390434
function (/**Array|Object*/tmpl, /**Object*/data) /**String*/{
            var res= "";
            // there are thre possible declarations array of functions, string and function
            // array case
            if (franky.isArray(tmpl)) {
                res = franky.map(tmpl, function (item) {
                    return typeof item === "string" ?
                        item:
                        item(data);
                }).join("");
            // function case
            } else if (franky.isFunction(tmpl)) {
                res = tmpl(data);
            // default string case
            } else {
                res = tmpl.toString();
            }

            return res;
        }
1279401
function _doOnce(fn) {
    var called = false;
    return function() {
      if (called) return;
      called = true;
      fn.apply(this, arguments);
    };
  }
357976
function( object, method ) {
            return function(){
                var args = arguments;
                if ( args === undefined ){
                    args = [];
                }
                return method.apply( object, args );
            };
        }
749862
function assertFn(fn: any, name: string) {
  return fn ? assert(_.isFunction(fn), `${name} must be a function`) : false;
}
488582
function(fn) {
        // Save off the existing spy method as __functionName
        var newName = '__' + fn;
        self[newName] = self[fn];

        // This is the actual function that will be called when,
        // for example, calledWith() is invoked
        return function() {
          var func = self[newName];
          
          // If this thing is a function, invoke it with all arguments;
          // otherwise, just grab the value of the property.
          var val = typeof func === 'function' ? func.apply(condition, arguments) : func;

          // Negate and return
          return !val;
        };
      }
11280
function (fn) {
    if (!fn || !_.isFunction(fn)) {
      var err = new Error('Please pass a valid function!');
      debug(err);
      throw err;
    }

    if (fn.length === 2) {
      this.getQueryForThisViewBuilder = fn;
      return this;
    }

    this.getQueryForThisViewBuilder = function (evt, callback) {
      callback(null, fn(evt));
    };

    var unwrappedFn = this.getQueryForThisViewBuilder;

    this.getQueryForThisViewBuilder = function (evt, clb) {
      var wrappedCallback = function () {
        try {
          clb.apply(this, _.toArray(arguments));
        } catch (e) {
          debug(e);
          process.emit('uncaughtException', e);
        }
      };

      try {
        unwrappedFn.call(this, evt, wrappedCallback);
      } catch (e) {
        debug(e);
        process.emit('uncaughtException', e);
      }
    };

    return this;
  }
224684
function (functionName, arguments) {
                var self = this;
                var args = self._getArgs(arguments);
                var callback = self._getCallback(arguments);

                return self._generic(functionName, args)
                    .nodeify(callback);
            }
878092
function handleFunction (node, options) {
  const args = handleExprList(node.args, options)
  return `${node.name}${args}`
}
1141777
function functions() {
		extend(Function.prototype, {
			bind: function bind(oThis) {
				if (typeof this !== "function") {
					throw new TypeError("Function bind not callable");
				}
				var fSlice = Array.prototype.slice,
					aArgs = fSlice.call(arguments, 1),
					fToBind = this,
					Fnop = function() {},
					fBound = function() {
						return fToBind.apply(
							this instanceof Fnop ? this : oThis || window,
							aArgs.concat(fSlice.call(arguments))
						);
					};
				Fnop.prototype = this.prototype;
				fBound.prototype = new Fnop();
				return fBound;
			}
		});
	}
957123
private boolean executeJavaScriptFunction(final String function) {
		List<WebView> webViews = viewFetcher.getCurrentViews(WebView.class, true);
		final WebView webView = viewFetcher.getFreshestView((ArrayList<WebView>) webViews);
		
		if(webView == null) {
			return false;
		}

		final String javaScript = setWebFrame(prepareForStartOfJavascriptExecution(webViews));
		
		inst.runOnMainSync(new Runnable() {
			public void run() {
				if(webView != null){
					webView.loadUrl("javascript:" + javaScript + function);
				}
			}
		});
		return true;
	}
665380
function handleFunction(fn, scope, thisVal) {
  var localScope = fn.node && fn.node.getAnnotation("scope") ? fn.node.getAnnotation("scope") : new Scope(scope);
  localScope.declare('__return');
  if(fn.node) {
    fn.node.setAnnotation("scope", localScope);
    fn.node.rewrite('Function(name, fargs, body)', function(b) {
      b.fargs.forEach(function(farg) {
        localScope.declare(farg.value);
        localScope.hint(farg.value, new Value());
      });
      localScope.declare('__this');
      localScope.hint('__this', thisVal);
      inferAllTypes(localScope, b.body);
      return this;
    });
  } else if(fn.returnValue) {
    localScope.hint('__return', fn.returnValue);
  }
  return localScope;
}
1189609
function(funcName, contextObject, _extraArgs) {
		var ctx = this._makeHookContext(contextObject),
			fn = this[funcName],
			args = Array.prototype.slice.call(arguments, 2);
		if(!$.isFunction(fn)){
			$.error("_callHook('" + funcName + "') is not a function");
		}
		args.unshift(ctx);
//		this.debug("_hook", funcName, ctx.node && ctx.node.toString() || ctx.tree.toString(), args);
		return fn.apply(this, args);
	}
803493
function (fn) {
    if (!fn || !_.isFunction(fn)) {
      var err = new Error('Please pass a valid function!');
      debug(err);
      throw err;
    }

    this.onEventMissingHandle = fn;

    return this;
  }
894636
function() {
  var args = arguments;
  return function(err) {
    var params = Array.prototype.slice.call(args);
    params.push(err);
    Entity.debug.apply(Entity.debug, params);
    throw err;
  };
}