4 ms·
Guessing they're scanning for parameters in a JSON object by doing something like ts = parseInt(jsonstr.indexOf("ts")+2); I wish I didn't come to this gue
by nothrabannosir 11y ago
Guessing they're scanning for parameters in a JSON object by doing something like
ts = parseInt(jsonstr.indexOf("ts")+2);
I wish I didn't come to this guess by seeing it in real code so many times…
T_T
- kpil 11y agoI just realized that our codebase is probably relatively ok...
- Gibbon1 11y agoOne of the reasons I've always been leery of regex. Especially since everyone I've seen using them tends to blindly copy an example from elsewhere and then bats at it until the test case passes.
- userbinator 11y agoIf only they had just looked for the whole key: ts = parseInt(jsonstr.indexOf("\"ts\":")+5);