liudong
2023-05-29 340f156319b863525e50e900c58e59b86ecb3d5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
 
});