File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 212212 ],
213213 "arrow-parens" : [
214214 " error" ,
215- " as-needed "
215+ " always "
216216 ],
217217 "arrow-body-style" : [
218218 " error" ,
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ class BankAccount {
1919BankAccount . collection = new Map ( ) ;
2020
2121const operations = {
22- Withdraw : command => {
22+ Withdraw : ( command ) => {
2323 const account = BankAccount . collection . get ( command . account ) ;
2424 account . balance -= command . amount ;
2525 } ,
26- Income : command => {
26+ Income : ( command ) => {
2727 const account = BankAccount . collection . get ( command . account ) ;
2828 account . balance += command . amount ;
2929 } ,
30- Allowed : command => {
30+ Allowed : ( command ) => {
3131 if ( command . operation === 'Income' ) return true ;
3232 const account = BankAccount . collection . get ( command . account ) ;
3333 return account . balance >= command . amount ;
Original file line number Diff line number Diff line change @@ -24,21 +24,21 @@ BankAccount.collection = new Map();
2424
2525const operations = {
2626 Withdraw : {
27- execute : command => {
27+ execute : ( command ) => {
2828 const account = BankAccount . find ( command . account ) ;
2929 account . balance -= command . amount ;
3030 } ,
31- undo : command => {
31+ undo : ( command ) => {
3232 const account = BankAccount . find ( command . account ) ;
3333 account . balance += command . amount ;
3434 } ,
3535 } ,
3636 Income : {
37- execute : command => {
37+ execute : ( command ) => {
3838 const account = BankAccount . find ( command . account ) ;
3939 account . balance += command . amount ;
4040 } ,
41- undo : command => {
41+ undo : ( command ) => {
4242 const account = BankAccount . find ( command . account ) ;
4343 account . balance -= command . amount ;
4444 } ,
You can’t perform that action at this time.
0 commit comments