jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Switch RegExps to literals #21

Closed jarofghosts closed 10 years ago

jarofghosts commented 10 years ago

Creating a new RegExp is unnecessary and (albeit trivially so) less performant than simply using the literal form.

Super minor change, but it stood out to me as I was reading through the source.