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.
		
		
		
		
		
			
		
			
				
					16 lines
				
				316 B
			
		
		
			
		
	
	
					16 lines
				
				316 B
			| 
											3 years ago
										 | define(['./isArray', './isObject', './_set'], function (isArray, isObject, _set) { | ||
|  | 
 | ||
|  |   // set the value in given path
 | ||
|  |   function set (obj, path, value) { | ||
|  |     if (!isObject(obj) || !isArray(path)) return obj; | ||
|  |     if (path.length === 0) return obj; | ||
|  | 
 | ||
|  |     _set(obj, path, value); | ||
|  | 
 | ||
|  |     return obj; | ||
|  |   } | ||
|  | 
 | ||
|  |   return set; | ||
|  | 
 | ||
|  | }); |