mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
* Bump lodash from 4.17.15 to 4.17.19 (#52) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * Bump @actions/core from 1.1.3 to 1.2.6 (#60) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * updating node_nodules * updated package-lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
1.0 KiB
JavaScript
51 lines
1.0 KiB
JavaScript
/*!
|
|
* get-value <https://github.com/jonschlinkert/get-value>
|
|
*
|
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
|
|
module.exports = function(obj, prop, a, b, c) {
|
|
if (!isObject(obj) || !prop) {
|
|
return obj;
|
|
}
|
|
|
|
prop = toString(prop);
|
|
|
|
// allowing for multiple properties to be passed as
|
|
// a string or array, but much faster (3-4x) than doing
|
|
// `[].slice.call(arguments)`
|
|
if (a) prop += '.' + toString(a);
|
|
if (b) prop += '.' + toString(b);
|
|
if (c) prop += '.' + toString(c);
|
|
|
|
if (prop in obj) {
|
|
return obj[prop];
|
|
}
|
|
|
|
var segs = prop.split('.');
|
|
var len = segs.length;
|
|
var i = -1;
|
|
|
|
while (obj && (++i < len)) {
|
|
var key = segs[i];
|
|
while (key[key.length - 1] === '\\') {
|
|
key = key.slice(0, -1) + '.' + segs[++i];
|
|
}
|
|
obj = obj[key];
|
|
}
|
|
return obj;
|
|
};
|
|
|
|
function isObject(val) {
|
|
return val !== null && (typeof val === 'object' || typeof val === 'function');
|
|
}
|
|
|
|
function toString(val) {
|
|
if (!val) return '';
|
|
if (Array.isArray(val)) {
|
|
return val.join('.');
|
|
}
|
|
return val;
|
|
}
|