mirror of
https://github.com/Azure/setup-helm.git
synced 2026-07-09 17:51:37 +00:00
v3 new release (#80)
This commit is contained in:
committed by
GitHub
parent
a767c8d3a1
commit
20d2b4f98d
+14
@@ -0,0 +1,14 @@
|
||||
var _toPath = require('./_toPath.js');
|
||||
var _deepGet = require('./_deepGet.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;
|
||||
Reference in New Issue
Block a user