Skip to content

Commit 98045e1

Browse files
committed
added code comment to design patterns
1 parent f367724 commit 98045e1

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

design-patterns/builder.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
});
2020
}
2121

22-
var el = document.querySelector("#test");
23-
el.addEventListener("click", getBeerByIdBridge, false);
22+
var el = document.querySelector('#test');
23+
el.addEventListener('click', getBeerByIdBridge, false);
2424

2525
function getBeerByIdBridge (e) {
2626
getBeerById(this.id, function(beer) {

design-patterns/command.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
return CarManager[commad.request](commad.model,commad.carID);
3131
};
3232

33-
var actionA = CarManager.execute({request: "requestInfo", model: 'Ford Mondeo', carID: '543434'});
33+
var actionA = CarManager.execute({request: 'requestInfo', model: 'Ford Mondeo', carID: '543434'});
3434
console.log(actionA);
35-
var actionB = CarManager.execute({request: "buyVehicle", model: 'Ford Mondeo', carID: '543434'});
35+
var actionB = CarManager.execute({request: 'buyVehicle', model: 'Ford Mondeo', carID: '543434'});
3636
console.log(actionB);
3737

3838
})();

design-patterns/factory.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@
3838
}
3939

4040
var o = jsp.dom.factory('Link');
41-
o.url = 'http://google.com'
41+
o.url = 'http://google.com';
4242
o.insert(document.body);
4343

4444
var taskManager = {};
4545

4646
taskManager.update = function() {
47-
console.log("update");
47+
console.log('update');
4848
}
4949

5050
taskManager.read = function() {
51-
console.log("read");
51+
console.log('read');
5252
}
5353

54-
var type = "update";
54+
var type = 'update';
5555
var task;
5656

5757
if (type === 'update') {

design-patterns/proxy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h1>Dave Matthews vids</h1>
7474
}
7575
},
7676
flush: function () {
77-
http.makeRequest(this.ids, "proxy.handler");
77+
http.makeRequest(this.ids, 'proxy.handler');
7878
// clear timeout and queue
7979
this.timeout = null;
8080
this.ids = [];

design-patterns/singleton.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
function Universe() {
2828

2929
// do we have an existing instance?
30-
if (typeof Universe.instance === "object") {
30+
if (typeof Universe.instance === 'object') {
3131
return Universe.instance;
3232
}
3333

0 commit comments

Comments
 (0)