You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					25 lines
				
				532 B
			
		
		
			
		
	
	
					25 lines
				
				532 B
			| 
								 
											4 years ago
										 
									 | 
							
								'use strict';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								module.exports = {
							 | 
						||
| 
								 | 
							
								  isObject: function(obj) {
							 | 
						||
| 
								 | 
							
								    var type = typeof obj;
							 | 
						||
| 
								 | 
							
								    return type === 'function' || type === 'object' && !!obj;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								, extend: function(obj) {
							 | 
						||
| 
								 | 
							
								    if (!this.isObject(obj)) {
							 | 
						||
| 
								 | 
							
								      return obj;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    var source, prop;
							 | 
						||
| 
								 | 
							
								    for (var i = 1, length = arguments.length; i < length; i++) {
							 | 
						||
| 
								 | 
							
								      source = arguments[i];
							 | 
						||
| 
								 | 
							
								      for (prop in source) {
							 | 
						||
| 
								 | 
							
								        if (Object.prototype.hasOwnProperty.call(source, prop)) {
							 | 
						||
| 
								 | 
							
								          obj[prop] = source[prop];
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								      }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    return obj;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								};
							 |