Skip to content

Commit 63b8e32

Browse files
committed
Fix code style
1 parent c5da862 commit 63b8e32

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

JavaScript/1-range.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Range {
3333
const value = current;
3434
current += step;
3535
return { value, done: false };
36-
}
36+
},
3737
};
3838
}
3939
}

JavaScript/4-producer-consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function* consume() {
2323
`Got data: ${data}\n` +
2424
`Count: ${count}\n` +
2525
`Sum: ${sum}\n` +
26-
`Average: ${sum / count}\n`
26+
`Average: ${sum / count}\n`,
2727
);
2828
}
2929
}

JavaScript/5-producer-consumer-send.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function* consume() {
2525
`Got data: ${data}\n` +
2626
`Count: ${count}\n` +
2727
`Sum: ${sum}\n` +
28-
`Average: ${sum / count}\n`
28+
`Average: ${sum / count}\n`,
2929
);
3030
}
3131
}

JavaScript/6-do-maybe.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
const { Just } = require('./helpers/maybe');
3+
const { Just } = require('./helpers/maybe.js');
44

5-
const doMonad = require('./helpers/do-notation');
5+
const doMonad = require('./helpers/do-notation.js');
66

7-
Just(5).then((x) => (
7+
Just(5).then((x) =>
88
Just(x + 3)
9-
).then((x) => (
10-
Just(x * 4)
11-
)).then(console.log));
9+
.then((x) =>
10+
Just(x * 4),
11+
).then(console.log));
1212

1313
doMonad(function* () {
1414
const a = yield Just(5);

JavaScript/7-do-promise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// Run `helpers/server.js` for this example to work.
44

5-
const getJSON = require('./helpers/get-json');
6-
const doMonad = require('./helpers/do-notation');
5+
const getJSON = require('./helpers/get-json.js');
6+
const doMonad = require('./helpers/do-notation.js');
77

88
const baseUrl = 'http://localhost:3000/';
99
doMonad(function* () {

JavaScript/8-catch-promise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// Run `helpers/server.js` for this example to work.
44

5-
const getJSON = require('./helpers/get-json');
6-
const doMonad = require('./helpers/do-notation');
5+
const getJSON = require('./helpers/get-json.js');
6+
const doMonad = require('./helpers/do-notation.js');
77

88
const baseUrl = 'http://localhost:3000/';
99
doMonad(function* () {

JavaScript/9-maybe-catch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const doMonad = require('./helpers/do-notation');
3+
const doMonad = require('./helpers/do-notation.js');
44

55
const Nothing = {
66
then() {
@@ -10,7 +10,7 @@ const Nothing = {
1010
catch(callback) {
1111
callback();
1212
return this;
13-
}
13+
},
1414
};
1515

1616
class Just {

JavaScript/a-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const m2 = {
4949
yield this.value;
5050
this.value *= a;
5151
return this.value;
52-
}
52+
},
5353
};
5454

5555
console.log('m2.genMethod(5).next() =', m2.genMethod(5).next());

JavaScript/helpers/maybe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Just(value) {
88

99
then(fn) {
1010
return fn(value);
11-
}
11+
},
1212
};
1313
}
1414

@@ -19,7 +19,7 @@ const Nothing = {
1919

2020
then() {
2121
return Nothing;
22-
}
22+
},
2323
};
2424

2525
module.exports = { Just, Nothing };

JavaScript/helpers/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ const routes = {
66
'/': (request, callback) => {
77
callback({
88
apiVersion: '1.0',
9-
resources: ['person', 'city']
9+
resources: ['person', 'city'],
1010
});
1111
},
1212

1313
'/person': (request, callback) => {
1414
callback({
1515
name: 'アレクセイ',
16-
age: 20
16+
age: 20,
1717
});
1818
},
1919

2020
'/city': (request, callback) => {
2121
callback({
2222
name: 'Kyiv',
23-
country: 'Ukraine'
23+
country: 'Ukraine',
2424
});
25-
}
25+
},
2626
};
2727

2828
const server = http.createServer((req, res) => {

0 commit comments

Comments
 (0)