1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-12 05:25:46 +01:00

Convert expression closures to arrow syntax.

This commit is contained in:
Doug Kearns
2013-09-15 00:42:51 +10:00
parent 6eeb0f50a2
commit 6ee830dfad
53 changed files with 702 additions and 703 deletions

View File

@@ -126,7 +126,7 @@ var Services = Module("Services", {
if (!service.interfaces.length)
return res.wrappedJSObject || res;
service.interfaces.forEach(function (iface) res instanceof Ci[iface]);
service.interfaces.forEach(iface => res instanceof Ci[iface]);
if (service.init && args.length) {
if (service.callable)
res[service.init].apply(res, args);
@@ -162,7 +162,7 @@ var Services = Module("Services", {
this.services[name] = { method: meth, class: class_, interfaces: Array.concat(ifaces || []) };
if (name in this && ifaces && !this.__lookupGetter__(name) && !(this[name] instanceof Ci.nsISupports))
throw TypeError();
memoize(this, name, function () self._create(name));
memoize(this, name, () => self._create(name));
},
/**
@@ -206,7 +206,7 @@ var Services = Module("Services", {
* @param {string} name The service's cache key.
*/
has: function has(name) Set.has(this.services, name) && this.services[name].class in Cc &&
this.services[name].interfaces.every(function (iface) iface in Ci)
this.services[name].interfaces.every(iface => iface in Ci)
});
endModule();