/
var
/
www
/
cobraambalaj
/
node_modules
/
collect.js
/
dist
/
helpers
/
/var/www/cobraambalaj/node_modules/collect.js/dist/helpers
mkdir
upload
Name
Size
Mode
Actions
clone.js
649
0644
edit
dl
rm
is.js
753
0644
edit
dl
rm
nestedValue.js
432
0644
edit
dl
rm
values.js
792
0644
edit
dl
rm
variadic.js
203
0644
edit
dl
rm
Edit:
/var/www/cobraambalaj/node_modules/collect.js/dist/helpers/nestedValue.js
(432B)
'use strict'; /** * Get value of a nested property * * @param mainObject * @param key * @returns {*} */ module.exports = function nestedValue(mainObject, key) { try { return key.split('.').reduce(function (obj, property) { return obj[property]; }, mainObject); } catch (err) { // If we end up here, we're not working with an object, and @var mainObject is the value itself return mainObject; } };
Save
cmd:
run