src/treenodes.js
function getPredicateFunction(predicate) {
    let fn = predicate;
    if (_.isString(predicate)) {
        fn = node => (_.isFunction(node[predicate]) ? node[predicate]() : node[predicate]);
    }

    return fn;
}
function getPredicateFunction(predicate) {
    let fn = predicate;
    if (_.isString(predicate)) {
        fn = node => (_.isFunction(node[predicate]) ? node[predicate]() : node[predicate]);
    }

    return fn;
}
function getPredicateFunction ( predicate ) { let fn = predicate ; if ( _ . isString ( predicate ) ) { fn = node => ( _ . isFunction ( node [ predicate ] ) ? node [ predicate ] ( ) : node [ predicate ] ) ; } return fn ; }
Creates a predicate function.

@private
@param {string|function} predicate Property name or custom function.
@return {function} Predicate function.
Creates a predicate function .