braintree / restricted-input

Restrict <input>s to certain valid characters (e.g. formatting phone or card numbers)
https://braintree.github.io/restricted-input/
MIT License
68 stars 25 forks source link

Define regexes outside of functions #9

Closed crookedneighbor closed 8 years ago

crookedneighbor commented 8 years ago

Minor optimization. Moves regex creation to variables at the top of the files so new regexs don't need to be created every time the functions run.

crookedneighbor commented 8 years ago

All tests pass.

mrak commented 8 years ago

👍