lib/module.js
function createQueuePusher(providerName, method, insertMethod, queue) {
		return function() {
			let args = arguments;

			// Add provide method to invokeQueue to execute it on bootstrap.
			(queue || invokeQueue)[insertMethod || 'push'](function provide(injector) {

				// Get provider
				let provider = injector.get(providerName);

				// Execute method on provider
				provider[method].apply(provider, args);

				// Return name in case of provider, factory, service, value or constant
				if (providerName === '$provide') {
					return args[0];
				}

			});

			return that;
		};
	}
function createQueuePusher(providerName, method, insertMethod, queue) {
		return function() {
			let args = arguments;

			// Add provide method to invokeQueue to execute it on bootstrap.
			(queue || invokeQueue)[insertMethod || 'push'](function provide(injector) {

				// Get provider
				let provider = injector.get(providerName);

				// Execute method on provider
				provider[method].apply(provider, args);

				// Return name in case of provider, factory, service, value or constant
				if (providerName === '$provide') {
					return args[0];
				}

			});

			return that;
		};
	}
function createQueuePusher ( providerName , method , insertMethod , queue ) { return function ( ) { let args = arguments ; // Add provide method to invokeQueue to execute it on bootstrap. ( queue || invokeQueue ) [ insertMethod || 'push' ] ( function provide ( injector ) { // Get provider let provider = injector . get ( providerName ) ; // Execute method on provider provider [ method ] . apply ( provider , args ) ; // Return name in case of provider, factory, service, value or constant if ( providerName === '$provide' ) { return args [ 0 ] ; } } ) ; return that ; } ; }
Helper to create a function which adds a provide-method to invokeQueue.
@param  {String} providerName $provide | $injector
@param  {String} method       method to execute on provider
@param  {String} insertMethod native array-methods (default: push)
@return {Object}              self
Helper to create a function which adds a provide - method to invokeQueue .