dist/index.es.js
function getDeepRef() {
  var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var path = arguments.length > 1 ? arguments[1] : undefined;
  var keys = getKeysFromPath(path);
  if (!keys.length) return target;
  var obj = target;

  while (obj && keys.length > 1) {
    obj = obj[keys.shift()];
  }

  var key = keys.shift();

  if (obj && obj.hasOwnProperty(key)) {
    return obj[key];
  }
}
function getDeepRef() {
  var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var path = arguments.length > 1 ? arguments[1] : undefined;
  var keys = getKeysFromPath(path);
  if (!keys.length) return target;
  var obj = target;

  while (obj && keys.length > 1) {
    obj = obj[keys.shift()];
  }

  var key = keys.shift();

  if (obj && obj.hasOwnProperty(key)) {
    return obj[key];
  }
}
function getDeepRef ( ) { var target = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ; var path = arguments . length > 1 ? arguments [ 1 ] : undefined ; var keys = getKeysFromPath ( path ) ; if ( ! keys . length ) return target ; var obj = target ; while ( obj && keys . length > 1 ) { obj = obj [ keys . shift ( ) ] ; } var key = keys . shift ( ) ; if ( obj && obj . hasOwnProperty ( key ) ) { return obj [ key ] ; } }
Gets a deep property in an object, based on a path to that property

@param {object} target an object to wherefrom to retrieve the deep reference of
@param {string} path   'path/to.prop'

@returns {object} the last prop in the path
Gets a deep property in an object based on a path to that property