We are defining the function inside of another function to avoid creating global variables.
971287
function () {

// Parse a number value.

            var number,
                string = '';

            if (ch === '-') {
                string = '-';
                next('-');
            }
            while (ch >= '0' && ch <= '9') {
                string += ch;
                next();
            }
            if (ch === '.') {
                string += '.';
                while (next() && ch >= '0' && ch <= '9') {
                    string += ch;
                }
            }
            if (ch === 'e' || ch === 'E') {
                string += ch;
                next();
                if (ch === '-' || ch === '+') {
                    string += ch;
                    next();
                }
                while (ch >= '0' && ch <= '9') {
                    string += ch;
                    next();
                }
            }
            number = +string;
            if (!isFinite(number)) {
                error("Bad number");
            } else {
                return number;
            }
        }
889264
function (v) {
            var i = this.__identifierInputMethod;
            v = v.toString(this);
            return !isUndefinedOrNull(i) ?
                isFunction(v[i]) ?
                    v[i]() :
                    isFunction(comb[i]) ?
                        comb[i](v)
                        : v
                : v;
        }
1338372
function define(name, expr, global){
  utils.assertType(name, 'string', 'name');
  expr = utils.unwrap(expr);
  var scope = this.currentScope;
  if (global && global.toBoolean().isTrue) {
    scope = this.global.scope;
  }
  var node = new nodes.Ident(name.val, expr);
  scope.add(node);
  return nodes.null;
}
114939
function(left, right, cost, identifier, allVars, joinVars) {

    this.left =  left;
    this.right = right;
    this.cost = cost;
    this.i = identifier;
    this.vars = allVars;
    this.join = joinVars;

}
988551
function bindFunctions(functions) {
	var _this = this;

	functions.forEach(function (f) {
		return _this[f] = _this[f].bind(_this);
	});
}
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;
        }
1312351
private function _processFunctionStart() {
		$this->_inFunction = true;
		$this->_cyclomaticComplexity = 1;
		$this->_npathComplexity = 0;
		$this->_functionLevel = $this->statementStack->count();
		$this->_justAfterFuncStmt = false;

		$this->_functionStartLine = $this->lineNumber;

		// Check the position of the open curly after the function declaration
		if ($this->_isActive('funcDefinitionOpenCurly')) {
			$pos = $this->_config->getTestProperty('funcDefinitionOpenCurly', 'position');

			$currentToken = $this->tokenizer->getCurrentToken();
			$previousToken = $this->tokenizer->peekPrvsValidToken();

			if ($pos === NEW_LINE) {
				// The previous token should be on the previous line
				$isPosOk = ($previousToken->line < $currentToken->line);
			} else {
				// The previous token should be on the same line
				$isPosOk = ($previousToken->line === $currentToken->line);
			}

			if (!$isPosOk) {
				$tmp = ($pos === SAME_LINE) ? "the previous line." : "a new line.";
				$msg = $this->_getMessage('LEFT_CURLY_POS', $tmp);
				$this->_writeError('funcDefinitionOpenCurly', $msg);
			}
		}
	}
1101395
function _nom(fun) {
    var src = fun.toString();
    src = src.substr('function '.length);
    var n = src.substr(0, src.indexOf('('));

    if (!L.isFunction(fun)) fail("Cannot derive the name of a non-function.");
    if (fun.name && (fun.name === n)) return fun.name;
    if (n) return n;
    fail("Anonymous function has no name.");
  }
139449
function (x, y, z) {
            y = (typeof (y) !== "undefined" ? y : x);
            z = (typeof (z) !== "undefined" ? z : x);
            return this._set(this.x * x, this.y * y, this.z * z);
        }
1073824
function curry(fn, obj) {
  // create a local copy of the function. don't apply anything yet
  // optionally bind an object to the `this` of the function.
  var newFunction = _.bind(fn, (obj || null));

  // curried functions always take one argument
  return function () {
    // create another copy of the function with the arguments applied
    var me = _.partial(newFunction, arguments);

    // take advantage of the fact that bind changes the method signature:
    // if we have no arguments left, run the method
    if (!me.length) return me();

    // otherwise, curry again and return that.
    return curry(me);
  };
}
1013685
public void setFunction(FunctionLibFunction function) {
	function.setFunctionLib(this);
	functions.put(function.getName(), function);
    }
90163
function() {

      // Not as nice as arguments.callee but at least we'll only have on reference.
      var _this = this;
      var extend = function() { return _this.extend.apply(_this, arguments); };

      // If we don't have enough arguments to do anything, just return an object
      if (arguments.length < 2) {
        return {};
      }

      // Argument shuffling
      if (typeof arguments[0] !== 'boolean') {
        Array.prototype.unshift.call(arguments, true);
      }

      // Remove the variables we need from the arguments stack.
      var deep = Array.prototype.shift.call(arguments);
      var one = Array.prototype.shift.call(arguments);
      var two = Array.prototype.shift.call(arguments);

      // If we have more than two objects to merge
      if (arguments.length > 0) {

        // Push two back on to the arguments stack, it's no longer special.
        Array.prototype.unshift.call(arguments, two);

        // While we have any more arguments, call extend with the initial obj and the next argument
        while (arguments.length > 0) {
          two = Array.prototype.shift.call(arguments);

          if (typeof two !== 'object') continue;

          one = extend(deep, one, two);
        }

        return one;
      }

      // Do some checking to force one and two to be objects
      if (typeof one !== 'object') {
        one = {};
      }

      if (typeof two !== 'object') {
        two = {};
      }

      // Loop through the second object to merge it with the first
      for (var key in two) {
        // If this key actually belongs to the second argument
        if (Object.prototype.hasOwnProperty.call(two, key)) {
          var current = two[key];

          if (deep && typeof current === 'object' && typeof one[key] === 'object') {
            // Deep copy
            one[key] = extend(one[key], current);
          } else {
            one[key] = current;
          }
        }
      }

      return one;
    }
104611
function(settings, updateCallback)
	{
		// Always a good idea...
		var self = this;

		// Good idea to create a variable to hold on to our settings, because they might change in the future. See below.
		var currentSettings = settings;

		/* This is some function where I'll get my data from somewhere */
		function getData()
		{
			var newData = { hello : "world! it's " + new Date().toLocaleTimeString() }; // Just putting some sample data in for fun.

			/* Get my data from somewhere and populate newData with it... Probably a JSON API or something. */
			/* ... */

			// I'm calling updateCallback to tell it I've got new data for it to munch on.
			updateCallback(newData);
		}

		// You'll probably want to implement some sort of timer to refresh your data every so often.
		var refreshTimer;

		function createRefreshTimer(interval)
		{
			if(refreshTimer)
			{
				clearInterval(refreshTimer);
			}

			refreshTimer = setInterval(function()
			{
				// Here we call our getData function to update freeboard with new data.
				getData();
			}, interval);
		}

		// **onSettingsChanged(newSettings)** (required) : A public function we must implement that will be called when a user makes a change to the settings.
		self.onSettingsChanged = function(newSettings)
		{
			// Here we update our current settings with the variable that is passed in.
			currentSettings = newSettings;
		}

		// **updateNow()** (required) : A public function we must implement that will be called when the user wants to manually refresh the datasource
		self.updateNow = function()
		{
			// Most likely I'll just call getData() here.
			getData();
		}

		// **onDispose()** (required) : A public function we must implement that will be called when this instance of this plugin is no longer needed. Do anything you need to cleanup after yourself here.
		self.onDispose = function()
		{
			// Probably a good idea to get rid of our timer.
			clearInterval(refreshTimer);
			refreshTimer = undefined;
		}

		// Here we call createRefreshTimer with our current settings, to kick things off, initially. Notice how we make use of one of the user defined settings that we setup earlier.
		createRefreshTimer(currentSettings.refresh_time);
	}
888754
function(funcName, expr, sup, sub) {
                    this.callBase();
                    this.setFlag("Func");
                    this.funcName = funcName;
                    this.setOperator(new FunctionOperator(funcName));
                    this.setExpr(expr);
                    this.setSuperscript(sup);
                    this.setSubscript(sub);
                }
1356608
function(keysFunc, undefinedOnly) {
    return function(obj) {
      var length = arguments.length;
      if (length < 2 || obj === null) return obj;
      for (var index = 1; index < length; index++) {
        var source = arguments[index];
        var keys = keysFunc(source);
        var l = keys.length;

        for (var i = 0; i < l; i++) {
          var key = keys[i];
          if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
        }
      }

      return obj;
    };
  }
1002773
function makeLocalizeFunction(localization, nested) {
  return function localizeFunction(key) {
    return nested ? byString(localization, key) : localization[key];
  };
}
1151642
private void removeUnreferencedFunctionArgs(Scope fparamScope) {
    // Notice that removing unreferenced function args breaks
    // Function.prototype.length. In advanced mode, we don't really care
    // about this: we consider "length" the equivalent of reflecting on
    // the function's lexical source.
    //
    // Rather than create a new option for this, we assume that if the user
    // is removing globals, then it's OK to remove unused function args.
    //
    // See http://blickly.github.io/closure-compiler-issues/#253
    if (!removeGlobals) {
      return;
    }

    Node function = fparamScope.getRootNode();
    checkState(function.isFunction());
    if (NodeUtil.isGetOrSetKey(function.getParent())) {
      // The parameters object literal setters can not be removed.
      return;
    }

    Node argList = NodeUtil.getFunctionParameters(function);
    // Strip as many unreferenced args off the end of the function declaration as possible.
    maybeRemoveUnusedTrailingParameters(argList, fparamScope);

    // Mark any remaining unused parameters are unused to OptimizeParameters can try to remove
    // them.
    markUnusedParameters(argList, fparamScope);
  }