THRIFT-5811: Update eslint & prettier
Client: js
Patch: Cameron Martin
This closes #3087
diff --git a/tutorial/nodejs/NodeServerPromise.js b/tutorial/nodejs/NodeServerPromise.js
index bff287b..ddd18f4 100644
--- a/tutorial/nodejs/NodeServerPromise.js
+++ b/tutorial/nodejs/NodeServerPromise.js
@@ -25,16 +25,16 @@
var data = {};
var server = thrift.createServer(Calculator, {
- ping: function() {
+ ping: function () {
console.log("ping()");
},
- add: function(n1, n2) {
+ add: function (n1, n2) {
console.log("add(", n1, ",", n2, ")");
return n1 + n2;
},
- calculate: function(logid, work) {
+ calculate: function (logid, work) {
console.log("calculate(", logid, ",", work, ")");
var val = 0;
@@ -48,33 +48,32 @@
if (work.num2 === 0) {
var x = new ttypes.InvalidOperation();
x.whatOp = work.op;
- x.why = 'Cannot divide by 0';
- throw x;
+ x.why = "Cannot divide by 0";
+ throw x;
}
val = work.num1 / work.num2;
} else {
var x = new ttypes.InvalidOperation();
x.whatOp = work.op;
- x.why = 'Invalid operation';
+ x.why = "Invalid operation";
throw x;
}
var entry = new SharedStruct();
entry.key = logid;
- entry.value = ""+val;
+ entry.value = "" + val;
data[logid] = entry;
return val;
},
- getStruct: function(key) {
+ getStruct: function (key) {
console.log("getStruct(", key, ")");
return data[key];
},
- zip: function() {
+ zip: function () {
console.log("zip()");
- }
-
+ },
});
server.listen(9090);