lib/application.js
function isServiceBeingInstantiated(serviceName) {
		for (var i = 0, len = serviceStack.length; i < len; i++) {
			if (serviceStack[i] === serviceName) {
				return true;
			}
		}

		return false;
	}
function isServiceBeingInstantiated(serviceName) {
		for (var i = 0, len = serviceStack.length; i < len; i++) {
			if (serviceStack[i] === serviceName) {
				return true;
			}
		}

		return false;
	}
function isServiceBeingInstantiated ( serviceName ) { for ( var i = 0 , len = serviceStack . length ; i < len ; i ++ ) { if ( serviceStack [ i ] === serviceName ) { return true ; } } return false ; }
Indicates if a given service is being instantiated. This is used to check
for circular dependencies in service instantiation. If two services
reference each other, it causes a stack overflow and is really hard to
track down, so we provide an extra check to make finding this issue
easier.
@param {string} serviceName The name of the service to check.
@returns {boolean} True if the service is already being instantiated,
false if not.
@private
Indicates if a given service is being instantiated . This is used to check for circular dependencies in service instantiation . If two services reference each other it causes a stack overflow and is really hard to track down so we provide an extra check to make finding this issue easier .