mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-08 09:35:44 +01:00
Use builtin String.startsWith, String.endsWith, and String.contains methods where appropriate.
This commit is contained in:
@@ -62,7 +62,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
}),
|
||||
|
||||
parse: function parse(str) {
|
||||
if (~'{['.indexOf(str[0]))
|
||||
if ('{['.contains(str[0]))
|
||||
return JSON.parse(str);
|
||||
return str;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user