index.js
function methodByPath(target, path) {
  path = pathToArray(path);

  const values = breadcrumbs(target, path);

  if (values.length < path.length) {
    return noop;
  }

  if (typeof values[values.length - 1] !== 'function') {
    return noop;
  }

  if (values.length > 1) {
    return values[values.length - 1].bind(values[values.length - 2]);
  }
  else {
    return values[0].bind(target);
  }
}
function methodByPath(target, path) {
  path = pathToArray(path);

  const values = breadcrumbs(target, path);

  if (values.length < path.length) {
    return noop;
  }

  if (typeof values[values.length - 1] !== 'function') {
    return noop;
  }

  if (values.length > 1) {
    return values[values.length - 1].bind(values[values.length - 2]);
  }
  else {
    return values[0].bind(target);
  }
}
function methodByPath ( target , path ) { path = pathToArray ( path ) ; const values = breadcrumbs ( target , path ) ; if ( values . length < path . length ) { return noop ; } if ( typeof values [ values . length - 1 ] !== 'function' ) { return noop ; } if ( values . length > 1 ) { return values [ values . length - 1 ] . bind ( values [ values . length - 2 ] ) ; } else { return values [ 0 ] . bind ( target ) ; } }
methodByPath - Receive method from deeply nested object as function with
captured context as the method's owner object.

@param  {*} target Deeply nested object or anything else.
@param  {Path} path Path to the method.
@return {Function} Returns function.
methodByPath - Receive method from deeply nested object as function with captured context as the method s owner object .