smali-kazmi / detect-mobile-browser

It is a very simple & small javascript lib to detect all major modern mobile browsers in both backend & frontend
72 stars 21 forks source link

Switch to RegExp.test() for faster matching #2

Closed avindra closed 9 years ago

avindra commented 9 years ago

Match parses matches into an array. Test returns a boolean value and does not try to capture anything:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test

Additionally, use helper method to make test calls on the User Agent

smali-kazmi commented 9 years ago

close this pull request because we are to far from this change