js: Use ES6 object literal shorthand syntax.

Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-20 13:18:43 -07:00
parent b2745f6e41
commit 96dcc0ce6e
189 changed files with 1328 additions and 1326 deletions

View File

@@ -15,10 +15,10 @@ const util = require("./util");
Handlebars.registerHelper("plural", (condition, one, other) => (condition === 1 ? one : other));
Handlebars.registerHelper({
eq: function (a, b) {
eq(a, b) {
return a === b;
},
and: function (...args) {
and(...args) {
args.pop(); // Handlebars options
if (args.length === 0) {
return true;
@@ -31,7 +31,7 @@ Handlebars.registerHelper({
}
return last;
},
or: function (...args) {
or(...args) {
args.pop(); // Handlebars options
if (args.length === 0) {
return false;
@@ -44,7 +44,7 @@ Handlebars.registerHelper({
}
return last;
},
not: function (a) {
not(a) {
return !a || Handlebars.Utils.isEmpty(a);
},
});