src/core/decoratable.js
/**
     * Returns a function which will execute the method at `keypath` in the
     * delegate (if it's a method), otherwise it will simply return the value.
     * This allows plugin authors to create aliases to methods which are not
     * necessarily present at time of aliasing.
     * @param {string} keypath Keypath in delegate
     * @returns {Function}
     * @private
     */
Returns a function which will execute the method at `keypath` in the
delegate (if it's a method), otherwise it will simply return the value.
This allows plugin authors to create aliases to methods which are not
necessarily present at time of aliasing.
@param {string} keypath Keypath in delegate
@returns {Function}
@private
Returns a function which will execute the method at ` keypath ` in the delegate ( if it ' s a method ) otherwise it will simply return the value . This allows plugin authors to create aliases to methods which are not necessarily present at time of aliasing . @param { string } keypath Keypath in delegate @returns { Function } @private
delegateResult (keypath) {
      if (is.unemptyString(keypath)) {
        return function result (...args) {
          const value = this.getDelegateProp(keypath);
          if (is.function(value)) {
            return value(...args);
          }
          return value;
        }.bind(this);
      }
      return noop;
    }
delegateResult ( keypath ) { if ( is . unemptyString ( keypath ) ) { return function result ( ... args ) { const value = this . getDelegateProp ( keypath ) ; if ( is . function ( value ) ) { return value ( ... args ) ; } return value ; } . bind ( this ) ; } return noop ; }
Returns a function which will execute the method at `keypath` in the
 delegate (if it's a method), otherwise it will simply return the value.
Returns a function which will execute the method at ` keypath ` in the delegate ( if it ' s a method ) otherwise it will simply return the value .