code: function getPredicateFunction(predicate) {
      let fn = predicate;
      if (_.isString(predicate)) {
          fn = node => (_.isFunction(node[predicate]) ? node[predicate]() : node[predicate]);
      }
  
      return fn;
  }
docs: Creates a predicate function.
  
  @private
  @param {string|function} predicate Property name or custom function.
  @return {function} Predicate function.