Skip to content

Commit 3884af9

Browse files
committed
Standardize function definition in object literals
1 parent 2bb3aa2 commit 3884af9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

09-behavioral-design-patterns/14-command/statusUpdateService.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ const statusUpdates = new Map()
33

44
// The Target
55
export const statusUpdateService = {
6-
postUpdate: function (status) {
6+
postUpdate (status) {
77
const id = Math.floor(Math.random() * 1000000)
88
statusUpdates.set(id, status)
99
console.log(`Status posted: ${status}`)
1010
return id
1111
},
1212

13-
destroyUpdate: id => {
13+
destroyUpdate (id) {
1414
statusUpdates.delete(id)
1515
console.log(`Status removed: ${id}`)
1616
}

0 commit comments

Comments
 (0)