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.
		
		
		
		
		
			
		
			
				
					15 lines
				
				501 B
			
		
		
			
		
	
	
					15 lines
				
				501 B
			| 
											3 years ago
										 | define(['./_toPath', './_deepGet', './isUndefined'], function (_toPath, _deepGet, isUndefined) { | ||
|  | 
 | ||
|  |   // Get the value of the (deep) property on `path` from `object`.
 | ||
|  |   // If any property in `path` does not exist or if the value is
 | ||
|  |   // `undefined`, return `defaultValue` instead.
 | ||
|  |   // The `path` is normalized through `_.toPath`.
 | ||
|  |   function get(object, path, defaultValue) { | ||
|  |     var value = _deepGet(object, _toPath(path)); | ||
|  |     return isUndefined(value) ? defaultValue : value; | ||
|  |   } | ||
|  | 
 | ||
|  |   return get; | ||
|  | 
 | ||
|  | }); |