src/treenodes.js
function baseStatePredicate(state, full) {
    if (full) {
        return this.extract(state);
    }

    // Cache a state predicate function
    const fn = getPredicateFunction(state);

    return this.flatten(node => {
        // Never include removed nodes unless specifically requested
        if (state !== 'removed' && node.removed()) {
            return false;
        }

        return fn(node);
    });
}
function baseStatePredicate(state, full) {
    if (full) {
        return this.extract(state);
    }

    // Cache a state predicate function
    const fn = getPredicateFunction(state);

    return this.flatten(node => {
        // Never include removed nodes unless specifically requested
        if (state !== 'removed' && node.removed()) {
            return false;
        }

        return fn(node);
    });
}
function baseStatePredicate ( state , full ) { if ( full ) { return this . extract ( state ) ; } // Cache a state predicate function const fn = getPredicateFunction ( state ) ; return this . flatten ( node => { // Never include removed nodes unless specifically requested if ( state !== 'removed' && node . removed ( ) ) { return false ; } return fn ( node ) ; } ) ; }
Base function to filter nodes by state value.

@private
@param {string} state State property
@param {boolean} full Return a non-flat hierarchy
@return {TreeNodes} Array of matching nodes.
Base function to filter nodes by state value .