Skip to content

Commit cfa2dc7

Browse files
authored
Merge pull request #363 from LinusU/object-shorthand
Use object shorthand for properties
2 parents 451580b + 656f3dd commit cfa2dc7

20 files changed

Lines changed: 120 additions & 120 deletions

benchmarks/alerts.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ function handleAlert (alertInfo, sev) {
103103
}
104104

105105
module.exports = {
106-
handleAlert: handleAlert,
107-
setupAlertSystem: setupAlertSystem,
108-
severity: severity,
109-
action: action
106+
handleAlert,
107+
setupAlertSystem,
108+
severity,
109+
action
110110
}

benchmarks/stats.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ function reportFinal (argv, print) {
317317
}
318318

319319
module.exports = {
320-
start: start,
321-
stop: stop,
322-
iteration: iteration,
323-
interval: interval,
324-
printHistogram: printHistogram,
325-
reportFinal: reportFinal,
326-
parseTimeToSecs: parseTimeToSecs
320+
start,
321+
stop,
322+
iteration,
323+
interval,
324+
printHistogram,
325+
reportFinal,
326+
parseTimeToSecs
327327
}

benchmarks/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function run (options) {
235235
var k = keygen(options.keyRange.min, options.keyRange.max)
236236
var key = { ns: options.namespace, set: options.set, key: k }
237237
var record = recordgen(k, options.binSpec)
238-
var ops = { key: key, record: record }
238+
var ops = { key, record }
239239
if (writeOps > 0) {
240240
writeOps--
241241
if (usePromises) {

examples/geospatialMonteCarlo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ shared.runner()
5252

5353
async function monteCarlo (client, argv) {
5454
const game = {
55-
client: client,
55+
client,
5656
noDarts: argv.darts, // number of darts to throw
5757
maxInFlight: argv.maxInFlight,
5858
maxLatLng: 10, // pick coordinates between (-10, -10) and (10, 10)

lib/event_loop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function setCommandQueuePolicy (policy) {
103103
}
104104

105105
module.exports = {
106-
releaseEventLoop: releaseEventLoop,
107-
registerASEventLoop: registerASEventLoop,
108-
setCommandQueuePolicy: setCommandQueuePolicy
106+
releaseEventLoop,
107+
registerASEventLoop,
108+
setCommandQueuePolicy
109109
}

lib/filter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class EqualPredicate extends SindexFilterPredicate {
7676
class RangePredicate extends SindexFilterPredicate {
7777
constructor (bin, min, max, dataType, indexType) {
7878
super(as.predicates.RANGE, bin, dataType, indexType, {
79-
min: min,
80-
max: max
79+
min,
80+
max
8181
})
8282
}
8383
}

lib/info.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ function splitBins (str) {
249249
}
250250
})
251251
return {
252-
stats: stats,
253-
names: names
252+
stats,
253+
names
254254
}
255255
}
256256

257257
module.exports = {
258-
parse: parse,
259-
separators: separators
258+
parse,
259+
separators
260260
}

lib/lists.js

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ exports.returnType = as.lists.returnType
274274
*/
275275
exports.setOrder = function (bin, order) {
276276
return new ListOperation(opcodes.LIST_SET_ORDER, bin, {
277-
order: order
277+
order
278278
})
279279
}
280280

@@ -290,7 +290,7 @@ exports.setOrder = function (bin, order) {
290290
*/
291291
exports.sort = function (bin, flags) {
292292
return new ListOperation(opcodes.LIST_SORT, bin, {
293-
flags: flags
293+
flags
294294
})
295295
}
296296

@@ -330,8 +330,8 @@ exports.sort = function (bin, flags) {
330330
*/
331331
exports.append = function (bin, value, policy) {
332332
return new ListOperation(opcodes.LIST_APPEND, bin, {
333-
value: value,
334-
policy: policy
333+
value,
334+
policy
335335
})
336336
}
337337

@@ -371,8 +371,8 @@ exports.append = function (bin, value, policy) {
371371
*/
372372
exports.appendItems = function (bin, list, policy) {
373373
return new ListOperation(opcodes.LIST_APPEND_ITEMS, bin, {
374-
list: list,
375-
policy: policy
374+
list,
375+
policy
376376
})
377377
}
378378

@@ -413,9 +413,9 @@ exports.appendItems = function (bin, list, policy) {
413413
*/
414414
exports.insert = function (bin, index, value, policy) {
415415
return new ListOperation(opcodes.LIST_INSERT, bin, {
416-
index: index,
417-
value: value,
418-
policy: policy
416+
index,
417+
value,
418+
policy
419419
})
420420
}
421421

@@ -455,9 +455,9 @@ exports.insert = function (bin, index, value, policy) {
455455
*/
456456
exports.insertItems = function (bin, index, list, policy) {
457457
return new ListOperation(opcodes.LIST_INSERT_ITEMS, bin, {
458-
index: index,
459-
list: list,
460-
policy: policy
458+
index,
459+
list,
460+
policy
461461
})
462462
}
463463

@@ -663,8 +663,8 @@ exports.removeRange = function (bin, index, count) {
663663
*/
664664
exports.removeByIndex = function (bin, index, returnType) {
665665
return new ListOperation(opcodes.LIST_REMOVE_BY_INDEX, bin, {
666-
index: index,
667-
returnType: returnType
666+
index,
667+
returnType
668668
})
669669
}
670670

@@ -691,9 +691,9 @@ exports.removeByIndex = function (bin, index, returnType) {
691691
*/
692692
exports.removeByIndexRange = function (bin, index, count, returnType) {
693693
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_INDEX_RANGE, bin, {
694-
index: index,
695-
count: count,
696-
returnType: returnType
694+
index,
695+
count,
696+
returnType
697697
})
698698
}
699699

@@ -718,8 +718,8 @@ exports.removeByIndexRange = function (bin, index, count, returnType) {
718718
*/
719719
exports.removeByValue = function (bin, value, returnType) {
720720
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE, bin, {
721-
value: value,
722-
returnType: returnType
721+
value,
722+
returnType
723723
})
724724
}
725725

@@ -744,8 +744,8 @@ exports.removeByValue = function (bin, value, returnType) {
744744
*/
745745
exports.removeByValueList = function (bin, values, returnType) {
746746
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_LIST, bin, {
747-
values: values,
748-
returnType: returnType
747+
values,
748+
returnType
749749
})
750750
}
751751

@@ -775,9 +775,9 @@ exports.removeByValueList = function (bin, values, returnType) {
775775
*/
776776
exports.removeByValueRange = function (bin, begin, end, returnType) {
777777
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_RANGE, bin, {
778-
begin: begin,
779-
end: end,
780-
returnType: returnType
778+
begin,
779+
end,
780+
returnType
781781
})
782782
}
783783

@@ -844,10 +844,10 @@ exports.removeByValueRange = function (bin, begin, end, returnType) {
844844
*/
845845
exports.removeByValueRelRankRange = function (bin, value, rank, count, returnType) {
846846
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_REL_RANK_RANGE, bin, {
847-
value: value,
848-
rank: rank,
849-
count: count,
850-
returnType: returnType
847+
value,
848+
rank,
849+
count,
850+
returnType
851851
})
852852
}
853853

@@ -872,8 +872,8 @@ exports.removeByValueRelRankRange = function (bin, value, rank, count, returnTyp
872872
*/
873873
exports.removeByRank = function (bin, rank, returnType) {
874874
return new ListOperation(opcodes.LIST_REMOVE_BY_RANK, bin, {
875-
rank: rank,
876-
returnType: returnType
875+
rank,
876+
returnType
877877
})
878878
}
879879

@@ -900,9 +900,9 @@ exports.removeByRank = function (bin, rank, returnType) {
900900
*/
901901
exports.removeByRankRange = function (bin, rank, count, returnType) {
902902
return new InvertibleListOp(opcodes.LIST_REMOVE_BY_RANK_RANGE, bin, {
903-
rank: rank,
904-
count: count,
905-
returnType: returnType
903+
rank,
904+
count,
905+
returnType
906906
})
907907
}
908908

@@ -1138,8 +1138,8 @@ exports.getRange = function (bin, index, count) {
11381138
*/
11391139
exports.getByIndex = function (bin, index, returnType) {
11401140
return new ListOperation(opcodes.LIST_GET_BY_INDEX, bin, {
1141-
index: index,
1142-
returnType: returnType
1141+
index,
1142+
returnType
11431143
})
11441144
}
11451145

@@ -1166,9 +1166,9 @@ exports.getByIndex = function (bin, index, returnType) {
11661166
*/
11671167
exports.getByIndexRange = function (bin, index, count, returnType) {
11681168
return new InvertibleListOp(opcodes.LIST_GET_BY_INDEX_RANGE, bin, {
1169-
index: index,
1170-
count: count,
1171-
returnType: returnType
1169+
index,
1170+
count,
1171+
returnType
11721172
})
11731173
}
11741174

@@ -1193,8 +1193,8 @@ exports.getByIndexRange = function (bin, index, count, returnType) {
11931193
*/
11941194
exports.getByValue = function (bin, value, returnType) {
11951195
return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE, bin, {
1196-
value: value,
1197-
returnType: returnType
1196+
value,
1197+
returnType
11981198
})
11991199
}
12001200

@@ -1219,8 +1219,8 @@ exports.getByValue = function (bin, value, returnType) {
12191219
*/
12201220
exports.getByValueList = function (bin, values, returnType) {
12211221
return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_LIST, bin, {
1222-
values: values,
1223-
returnType: returnType
1222+
values,
1223+
returnType
12241224
})
12251225
}
12261226

@@ -1250,9 +1250,9 @@ exports.getByValueList = function (bin, values, returnType) {
12501250
*/
12511251
exports.getByValueRange = function (bin, begin, end, returnType) {
12521252
return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_RANGE, bin, {
1253-
begin: begin,
1254-
end: end,
1255-
returnType: returnType
1253+
begin,
1254+
end,
1255+
returnType
12561256
})
12571257
}
12581258

@@ -1318,10 +1318,10 @@ exports.getByValueRange = function (bin, begin, end, returnType) {
13181318
*/
13191319
exports.getByValueRelRankRange = function (bin, value, rank, count, returnType) {
13201320
return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_REL_RANK_RANGE, bin, {
1321-
value: value,
1322-
rank: rank,
1323-
count: count,
1324-
returnType: returnType
1321+
value,
1322+
rank,
1323+
count,
1324+
returnType
13251325
})
13261326
}
13271327

@@ -1346,8 +1346,8 @@ exports.getByValueRelRankRange = function (bin, value, rank, count, returnType)
13461346
*/
13471347
exports.getByRank = function (bin, rank, returnType) {
13481348
return new ListOperation(opcodes.LIST_GET_BY_RANK, bin, {
1349-
rank: rank,
1350-
returnType: returnType
1349+
rank,
1350+
returnType
13511351
})
13521352
}
13531353

@@ -1374,9 +1374,9 @@ exports.getByRank = function (bin, rank, returnType) {
13741374
*/
13751375
exports.getByRankRange = function (bin, rank, count, returnType) {
13761376
return new InvertibleListOp(opcodes.LIST_GET_BY_RANK_RANGE, bin, {
1377-
rank: rank,
1378-
count: count,
1379-
returnType: returnType
1377+
rank,
1378+
count,
1379+
returnType
13801380
})
13811381
}
13821382

@@ -1420,9 +1420,9 @@ exports.getByRankRange = function (bin, rank, count, returnType) {
14201420
*/
14211421
exports.increment = function (bin, index, value, policy) {
14221422
return new ListOperation(opcodes.LIST_INCREMENT, bin, {
1423-
index: index,
1424-
value: value,
1425-
policy: policy
1423+
index,
1424+
value,
1425+
policy
14261426
})
14271427
}
14281428

0 commit comments

Comments
 (0)