RegEx is slower. I suggest using if statements on char codes and and to
check it's within the range of z-a etc ...
If you check Yusuke's links, that is exactly what Esprima is doing.
The use of regular expression is reserved only for the slow/uncommon
code path.
--
Ariya Hidayat, http
/validate.html.
Maybe that can be useful.
Best regards,
--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
http://gplus.to/ariyahidayat
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
Minor correction on the name, it's Nashorn (German word for
rhinoceros, hence a play on Rhino).
--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
a slightly dangerous path due to the so-called Boolean Trap.
See e.g. http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html.
--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
___
es-discuss mailing list
es-discuss
https://github.com/matthewrobb/six from Matthew Robb is another ES6 to
ES5 transpiler.
--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
5 matches
Mail list logo