nl_tokens: Create the regex to do the matching . If the leading character in the glob is ! a negation regex is returned .
pl_tokens: function wrapGlob ( glob , opts ) { var <mask> = ( opts && ! opts . contains ) ? '^' : '' ; var after = ( opts && ! opts . contains ) ? '$' : '' ; glob = ( '(?:' + glob + ')' + after ) ; if ( opts && opts . negate ) { return prefix + ( '(?!^' + glob + ').*$' ) ; } return prefix + glob ; }