nl_tokens: Expand exponential ranges
pl_tokens: function exponential ( str , options , fn ) { if ( typeof options === 'function' ) { fn = options ; options = null ; } var opts = options || { } ; var esc = '__ESC_EXP__' ; var exp = 0 ; var res ; var parts = str . split ( '{,}' ) ; if ( opts . nodupes ) { return fn ( parts . join ( '' ) , opts ) ; } exp = parts . length - 1 ; res = fn ( parts . <mask> ( esc ) , opts ) ; var len = res . length ; var arr = [ ] ; var i = 0 ; while ( len -- ) { var ele = res [ i ++ ] ; var idx = ele . indexOf ( esc ) ; if ( idx === - 1 ) { arr . push ( ele ) ; } else { ele = ele . split ( '__ESC_EXP__' ) . join ( '' ) ; if ( ! ! ele && opts . nodupes !== false ) { arr . push ( ele ) ; } else { var num = Math . pow ( 2 , exp ) ; arr . push . apply ( arr , repeat ( ele , num ) ) ; } } } return arr ; }