nl_tokens: Convert the given braces pattern into a regex - compatible string . By default only one string is generated for every input string . Set options . expand to true to return an array of patterns ( similar to Bash or minimatch . Before using options . expand it s recommended that you read the [ performance notes ] ( #performance )) .
pl_tokens: function braces ( pattern , options ) { var key = utils . createKey ( String ( pattern ) , options ) ; var arr = [ ] ; var disabled = options && options . cache === false ; if ( ! disabled && cache . hasOwnProperty ( key ) ) { return cache [ key ] ; } if ( Array . isArray ( pattern ) ) { for ( var i = 0 ; i < pattern . length ; i ++ ) { arr . push . apply ( arr , braces . create ( pattern [ i ] , options ) ) ; } } else { arr = braces . create ( pattern , options ) ; } if ( options && options . nodupes === <mask> ) { arr = unique ( arr ) ; } if ( ! disabled ) { cache [ key ] = arr ; } return arr ; }