jashkenas/underscore — pull request #1740 by megawac (2014-07-12 15:07:39+00:00)
Title: Optimize and simplify escape

Escape is optimized by testing whether the string contains some escape character prior to replacement.

Some discussion https://github.com/megawac/underscore/compare/escape-simp

JSPerf: http://jsperf.com/underscore-escape