nl_tokens: Group patterns by base directory of each pattern .
pl_tokens: function groupPatternsByBaseDirectory ( patterns ) { return patterns . reduce ( function ( collection , pattern ) { var base = patternUtils . getBaseDirectory ( pattern ) ; if ( <mask> in collection ) { collection [ base ] . push ( pattern ) ; } else { collection [ base ] = [ pattern ] ; } return collection ; } , { } ) ; }