This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/node_modules/underscore/cjs/get.js
2025-01-13 09:33:52 +03:00

15 lines
518 B
JavaScript

var _deepGet = require('./_deepGet.js');
var _toPath = require('./_toPath.js');
var isUndefined = require('./isUndefined.js');
// 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;
}
module.exports = get;