@@ -171,7 +171,7 @@ module.exports = [Cockpit, Turbine, OnCommand, OffCommand, SpeedUpCommand, Speed
171
171
```
172
172
##### command_es6.js
173
173
``` Javascript
174
- class Cockipt {
174
+ class Cockpit {
175
175
constructor (command ) {
176
176
this .command = command;
177
177
}
@@ -210,7 +210,8 @@ class OffCommand {
210
210
}
211
211
}
212
212
213
- module .exports = [Cockipt, Turbine, OnCommand, OffCommand];
213
+ export { Cockpit , Turbine , OnCommand , OffCommand };
214
+
214
215
215
216
```
216
217
@@ -282,7 +283,7 @@ class Num {
282
283
}
283
284
284
285
285
- module . exports = [ Num, Min, Sum] ;
286
+ export { Num , Min , Sum } ;
286
287
287
288
```
288
289
@@ -323,7 +324,7 @@ class Iterator {
323
324
}
324
325
}
325
326
326
- module . exports = Iterator;
327
+ export default Iterator ;
327
328
328
329
```
329
330
@@ -380,7 +381,7 @@ class Airplane{
380
381
}
381
382
382
383
383
- module . exports = [ TrafficTower, Airplane] ;
384
+ export { TrafficTower , Airplane } ;
384
385
385
386
```
386
387
@@ -423,7 +424,7 @@ class Memento {
423
424
}
424
425
}
425
426
426
- var originator = {
427
+ const originator = {
427
428
store : function (val ) {
428
429
return new Memento (val);
429
430
},
@@ -448,7 +449,7 @@ class Caretaker {
448
449
449
450
450
451
451
- module . exports = [ originator, Caretaker] ;
452
+ export { originator , Caretaker } ;
452
453
453
454
```
454
455
@@ -538,7 +539,7 @@ class proft {
538
539
}
539
540
}
540
541
541
- module . exports = [ Product, fees, proft] ;
542
+ export { Product , fees , proft } ;
542
543
543
544
```
544
545
@@ -620,7 +621,7 @@ class Order {
620
621
};
621
622
}
622
623
623
- module . exports = Order;
624
+ export default Order ;
624
625
625
626
```
626
627
@@ -685,7 +686,7 @@ function premiumStrategy(amount) {
685
686
return amount * 0.8 ;
686
687
}
687
688
688
- module . exports = [ ShoppingCart, guestStrategy, regularStrategy, premiumStrategy] ;
689
+ export { ShoppingCart , guestStrategy , regularStrategy , premiumStrategy } ;
689
690
690
691
```
691
692
@@ -758,7 +759,7 @@ class Tax2 extends Tax {
758
759
}
759
760
}
760
761
761
- module . exports = [ Tax1, Tax2] ;
762
+ export { Tax1 , Tax2 } ;
762
763
763
764
```
764
765
@@ -828,7 +829,7 @@ class Developer extends Employee {
828
829
}
829
830
}
830
831
831
- module . exports = [ Developer, Manager, bonusVisitor] ;
832
+ export { Developer , Manager , bonusVisitor } ;
832
833
833
834
```
834
835
@@ -892,7 +893,7 @@ class Rx24 {
892
893
}
893
894
894
895
895
- module . exports = droidProducer;
896
+ export default droidProducer ;
896
897
897
898
```
898
899
@@ -969,7 +970,7 @@ class RequestBuilder {
969
970
970
971
}
971
972
972
- module . exports = RequestBuilder;
973
+ export default RequestBuilder ;
973
974
974
975
```
975
976
@@ -1012,7 +1013,7 @@ class Bmw {
1012
1013
}
1013
1014
}
1014
1015
1015
- module . exports = BmwFactory;
1016
+ export default BmwFactory ;
1016
1017
1017
1018
```
1018
1019
@@ -1045,7 +1046,7 @@ class Sheep {
1045
1046
}
1046
1047
}
1047
1048
1048
- module . exports = Sheep;
1049
+ export default Sheep ;
1049
1050
1050
1051
```
1051
1052
@@ -1077,7 +1078,7 @@ class Person {
1077
1078
}
1078
1079
}
1079
1080
1080
- module . exports = Person;
1081
+ export default Person ;
1081
1082
1082
1083
```
1083
1084
@@ -1145,7 +1146,7 @@ class JediAdapter {
1145
1146
}
1146
1147
}
1147
1148
1148
- module . exports = [ Soldier, Jedi, JediAdapter] ;
1149
+ export { Soldier , Jedi , JediAdapter } ;
1149
1150
1150
1151
```
1151
1152
@@ -1226,7 +1227,7 @@ class AlcoholInk extends Ink {
1226
1227
}
1227
1228
}
1228
1229
1229
- module . exports = [ EpsonPrinter, HPprinter, AcrylicInk, AlcoholInk] ;
1230
+ export { EpsonPrinter , HPprinter , AcrylicInk , AlcoholInk } ;
1230
1231
1231
1232
```
1232
1233
@@ -1350,7 +1351,7 @@ class Memory extends Equipment {
1350
1351
}
1351
1352
}
1352
1353
1353
- module . exports = [ Cabbinet, FloppyDisk, HardDrive, Memory] ;
1354
+ export { Cabbinet , FloppyDisk , HardDrive , Memory } ;
1354
1355
1355
1356
```
1356
1357
@@ -1440,7 +1441,7 @@ class CheeseDecorator extends PastaDecorator {
1440
1441
}
1441
1442
}
1442
1443
1443
- module . exports = [ Penne, SauceDecorator, CheeseDecorator] ;
1444
+ export { Penne , SauceDecorator , CheeseDecorator } ;
1444
1445
1445
1446
```
1446
1447
@@ -1508,7 +1509,7 @@ class Fees {
1508
1509
}
1509
1510
}
1510
1511
1511
- module . exports = ShopFacade;
1512
+ export default ShopFacade ;
1512
1513
1513
1514
```
1514
1515
0 commit comments