Allow modules to be prepended
This commit is contained in:
		
							
								
								
									
										17
									
								
								api.js
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								api.js
									
									
									
									
									
								
							@@ -14,11 +14,22 @@ var hash = cl.load( "botansx.utils.hash" );
 | 
				
			|||||||
var BotanJS = function()
 | 
					var BotanJS = function()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	events.EventEmitter.call( this );
 | 
						events.EventEmitter.call( this );
 | 
				
			||||||
 | 
						this.sv = {};
 | 
				
			||||||
	this.kv = {};
 | 
						this.kv = {};
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
util.inherits( BotanJS, events.EventEmitter );
 | 
					util.inherits( BotanJS, events.EventEmitter );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BotanJS.prototype.unshift = function()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for( var i in arguments )
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							var mod = arguments[i];
 | 
				
			||||||
 | 
							this.sv[ mod ] = true;
 | 
				
			||||||
 | 
							this.remove( mod );
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BotanJS.prototype.push = function()
 | 
					BotanJS.prototype.push = function()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	for( var i in arguments )
 | 
						for( var i in arguments )
 | 
				
			||||||
@@ -37,10 +48,8 @@ BotanJS.prototype.compile = function( type )
 | 
				
			|||||||
	var _self = this;
 | 
						var _self = this;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var j = conf.debug ? [ "Components.Console" ] : [];
 | 
						var j = conf.debug ? [ "Components.Console" ] : [];
 | 
				
			||||||
	for( var i in this.kv )
 | 
						for( var i in this.sv ) if( this.sv[ i ] ) j.push( i );
 | 
				
			||||||
	{
 | 
						for( var i in this.kv ) if( this.kv[ i ] ) j.push( i );
 | 
				
			||||||
		if( this.kv[ i ] ) j.push( i );
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var rainet = conf.rinet || conf.serviceUri;
 | 
						var rainet = conf.rinet || conf.serviceUri;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user