lib/collection/property-base.js
function (property, customizer) {
        var parent = this;

        // if customizer is present test with it
        if (customizer) {
            customizer = customizer.bind(this);

            do {
                // else check for existence
                if (customizer(parent)) {
                    return parent;
                }

                parent = parent.__parent;
            } while (parent);
        }

        // else check for existence
        else {
            do {
                if (parent[property]) {
                    return parent;
                }

                parent = parent.__parent;
            } while (parent);
        }
    }
function (property, customizer) {
        var parent = this;

        // if customizer is present test with it
        if (customizer) {
            customizer = customizer.bind(this);

            do {
                // else check for existence
                if (customizer(parent)) {
                    return parent;
                }

                parent = parent.__parent;
            } while (parent);
        }

        // else check for existence
        else {
            do {
                if (parent[property]) {
                    return parent;
                }

                parent = parent.__parent;
            } while (parent);
        }
    }
function ( property , customizer ) { var parent = this ; // if customizer is present test with it if ( customizer ) { customizer = customizer . bind ( this ) ; do { // else check for existence if ( customizer ( parent ) ) { return parent ; } parent = parent . __parent ; } while ( parent ) ; } // else check for existence else { do { if ( parent [ property ] ) { return parent ; } parent = parent . __parent ; } while ( parent ) ; } }
Looks up the closest parent which has a truthy value for the given property. Lookup will continue
until `customizer` returns a truthy value. If used without a customizer,
the lookup will stop at the first parent that contains the property.

@param {String} property
@param {Function} [customizer]

@returns {PropertyBase|undefined}
@private
Looks up the closest parent which has a truthy value for the given property . Lookup will continue until customizer returns a truthy value . If used without a customizer the lookup will stop at the first parent that contains the property .