I did some [jsperf on newline regex](http://jsperf.com/newline-regex) and, in fact, the performance of the simplified one I provided as default is way better than the array-built one.