Use String(val) instead of val.toString().
authorDaniel Carl <danielcarl@gmx.de>
Sat, 9 Aug 2014 16:07:09 +0000 (18:07 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 9 Aug 2014 16:17:55 +0000 (18:17 +0200)
This seems to be a little faster in current JavaScript implementation of
webkit.

src/hints.js

index f58c0ab..0486714 100644 (file)
@@ -266,7 +266,7 @@ Object.freeze((function(){
                 /* assign the new hint number to the hint */
                 hint.num = num;
                 /* check for number filter */
-                if (!filterNum || 0 === num.toString().indexOf(filterNum.toString())) {
+                if (!filterNum || 0 === String(num).indexOf(String(filterNum))) {
                     hint.show();
                     validHints.push(hint);
                 } else {