ESlint object-curly-spacing

This commit is contained in:
Peter Jaszkowiak
2017-02-18 12:30:49 -07:00
parent 1493afee2a
commit 896c8c7343
207 changed files with 971 additions and 971 deletions

View File

@@ -7,9 +7,9 @@ module.exports = function (db, module) {
}
var pipeline = [
{ $match: { _key: {$in: keys}} },
{ $group: { _id: {value: '$value'}, count: {$sum: 1}} },
{ $match: { count: keys.length} },
{ $match: { _key: { $in: keys } } },
{ $group: { _id: { value: '$value' }, count: { $sum: 1 } } },
{ $match: { count: keys.length } },
{ $group: { _id: null, count: { $sum: 1 } } },
];
@@ -47,7 +47,7 @@ module.exports = function (db, module) {
limit = 0;
}
var pipeline = [{ $match: { _key: {$in: sets}} }];
var pipeline = [{ $match: { _key: { $in: sets } } }];
weights.forEach(function (weight, index) {
if (weight !== 1) {
@@ -70,9 +70,9 @@ module.exports = function (db, module) {
}
});
pipeline.push({ $group: { _id: {value: '$value'}, totalScore: aggregate, count: {$sum: 1}} });
pipeline.push({ $match: { count: sets.length} });
pipeline.push({ $sort: { totalScore: params.sort} });
pipeline.push({ $group: { _id: { value: '$value' }, totalScore: aggregate, count: { $sum: 1 } } });
pipeline.push({ $match: { count: sets.length } });
pipeline.push({ $sort: { totalScore: params.sort } });
if (start) {
pipeline.push({ $skip: start });
@@ -82,7 +82,7 @@ module.exports = function (db, module) {
pipeline.push({ $limit: limit });
}
var project = { _id: 0, value: '$_id.value'};
var project = { _id: 0, value: '$_id.value' };
if (params.withScores) {
project.score = '$totalScore';
}