Skip to content

Commit cfa7ec2

Browse files
committed
added references to the patterns
1 parent 0712c3f commit cfa7ec2

39 files changed

+286
-8
lines changed

design-patterns/builder.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
console.log('Requested Beer: '+beer);
2424
});
2525
}
26+
27+
// reference
28+
// http://www.jspatterns.com/
29+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
30+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
2631
</script>
2732
</body>
2833
</html>

design-patterns/chain-of-responsibility.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
//}
5757

5858
button.handle();
59+
60+
// reference
61+
// http://www.jspatterns.com/
62+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
63+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
5964
</script>
6065
</body>
6166
</html>

design-patterns/command.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333

3434
})();
3535

36+
// reference
37+
// http://www.jspatterns.com/
38+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
39+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
3640
</script>
3741
</body>
3842
</html>

design-patterns/decorator.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
tree = tree.getDecorator('RedBalls');
4343

4444
tree.decorate();
45+
46+
// reference
47+
// http://www.jspatterns.com/
48+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
49+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
4550
</script>
4651
</body>
4752
</html>

design-patterns/facade.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
}
1515
// ...
1616
};
17+
18+
// reference
19+
// http://www.jspatterns.com/
20+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
21+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
1722
</script>
1823
</body>
1924
</html>

design-patterns/factory.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
</head>
77
<body>
88
<script>
9-
/***
109
var jsp = {};
1110
jsp.dom = {};
1211
jsp.dom.Text = function() {
@@ -76,7 +75,11 @@
7675
n.constructor === Number; // true
7776
s.constructor === String; // true
7877
b.constructor === Boolean; // true
79-
78+
79+
// reference
80+
// http://www.jspatterns.com/
81+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
82+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
8083
</script>
8184
</body>
8285
</html>

design-patterns/iterator.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
// go back
5959
agg.rewind();
6060
console.log(agg.current()); // 1
61+
62+
// reference
63+
// http://www.jspatterns.com/
64+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
65+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
6166
</script>
6267
</body>
6368
</html>

design-patterns/mediator.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
console.log('Game over!');
8181
}, 30000);
8282

83+
// reference
84+
// http://www.jspatterns.com/
85+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
86+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
8387
</script>
8488
</body>
8589
</html>

design-patterns/observer.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070

7171
la_times.addSubscriber(jill.gossip);
7272
la_times.newIssue();
73+
74+
// reference
75+
// http://www.jspatterns.com/
76+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
77+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
7378
</script>
7479
</body>
7580
</html>

design-patterns/proxy.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ <h1>Dave Matthews vids</h1>
201201
}
202202
};
203203

204+
// reference
205+
// http://www.jspatterns.com/
206+
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
207+
// http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/
204208
</script>
205209
</body>
206210
</html>

0 commit comments

Comments
 (0)