lib/expose.js
function defaultUngrep(targets) {
    if (targets && targets.length) {
        var ungreps = [], target, len = targets.length;

        for (var i = 0; i < len; i++) {
            target = targets[i];
            target = '(?:^' + path.dirname(target) + sep + '){1}';
            target += '(?:/?.*/?)*' + NM_SEG;
            ungreps.push(new RegExp(escape(target)));
        }
        return ungreps;
    }
    return [new RegExp(escape(NM_SEG))];
}
function defaultUngrep(targets) {
    if (targets && targets.length) {
        var ungreps = [], target, len = targets.length;

        for (var i = 0; i < len; i++) {
            target = targets[i];
            target = '(?:^' + path.dirname(target) + sep + '){1}';
            target += '(?:/?.*/?)*' + NM_SEG;
            ungreps.push(new RegExp(escape(target)));
        }
        return ungreps;
    }
    return [new RegExp(escape(NM_SEG))];
}
function defaultUngrep ( targets ) { if ( targets && targets . length ) { var ungreps = [ ] , target , len = targets . length ; for ( var i = 0 ; i < len ; i ++ ) { target = targets [ i ] ; target = '(?:^' + path . dirname ( target ) + sep + '){1}' ; target += '(?:/?.*/?)*' + NM_SEG ; ungreps . push ( new RegExp ( escape ( target ) ) ) ; } return ungreps ; } return [ new RegExp ( escape ( NM_SEG ) ) ] ; }
Build default ungrep pattern based on targets.

@param {Array} targets
@returns {Array} The default ungrep regex in an array.
@api private
Build default ungrep pattern based on targets .