Skip to content

Commit 1b58d96

Browse files
Merge pull request zoltantothcom#65 from Beraliv/master
Fix wrong indents
2 parents f3e9575 + 88be381 commit 1b58d96

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/static/patterns/behavioral_template.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const TEMPLATE = {
77
Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.`,
88
when: `you have to define steps of the algorithm once and let subclasses to implement its behaviour`,
99
codeES5: `function Tax() {}
10-
1110
Tax.prototype.calc = function(value) {
1211
if (value >= 1000) value = this.overThousand(value);
1312
@@ -19,16 +18,16 @@ Tax.prototype.complementaryFee = function(value) {
1918
};
2019
2120
function Tax1() {}
22-
Tax1.prototype = Object.create(Tax.prototype);
21+
Tax1.prototype = Object.create(Tax.prototype);
2322
24-
Tax1.prototype.overThousand = function(value) {
23+
Tax1.prototype.overThousand = function(value) {
2524
return value * 1.1;
2625
};
2726
2827
function Tax2() {}
29-
Tax2.prototype = Object.create(Tax.prototype);
28+
Tax2.prototype = Object.create(Tax.prototype);
3029
31-
Tax2.prototype.overThousand = function(value) {
30+
Tax2.prototype.overThousand = function(value) {
3231
return value * 1.2;
3332
};
3433

src/static/patterns/creational_abstractFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ function pilotDroidPattern() {
2020
}
2121
2222
function B1() {}
23-
B1.prototype.info = function() {
23+
B1.prototype.info = function() {
2424
return 'B1, Battle Droid';
2525
};
2626
2727
function Rx24() {}
28-
Rx24.prototype.info = function() {
28+
Rx24.prototype.info = function() {
2929
return 'Rx24, Pilot Droid';
3030
};
3131

0 commit comments

Comments
 (0)