/var/www/cobraambalaj/node_modules/collect.js/src/helpers
NameSizeModeActions
clone.js3750644editdlrm
is.js3330644editdlrm
nestedValue.js4040644editdlrm
values.js4950644editdlrm
variadic.js2030644editdlrm
Edit: /var/www/cobraambalaj/node_modules/collect.js/src/helpers/nestedValue.js (404B)
'use strict'; /** * Get value of a nested property * * @param mainObject * @param key * @returns {*} */ module.exports = function nestedValue(mainObject, key) { try { return key.split('.').reduce((obj, property) => 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; } };