Skip to content
This repository was archived by the owner on Jan 13, 2018. It is now read-only.

Commit 6c9362a

Browse files
author
David Luecke
committed
Updated readme
1 parent a8ed31c commit 6c9362a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

readme.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ JS.Class
22
========
33

44
JS.Class is a class framework based on [JavaScriptMVC $.Class](http://javascriptmvc.com/docs.html#&who=jQuery.Class)
5-
and [John Resig's Simple JavaScript inheritance](http://ejohn.org/blog/simple-javascript-inheritance/).
5+
and [John Resig's Simple JavaScript inheritance](http://ejohn.org/blog/simple-javascript-inheritance/) and can be used
6+
with NodeJS or other JavaScript engines.
67

78
It encourages a hybrid (as made popular by e.g. Scala) approach between functional and object oriented programming.
89

@@ -14,8 +15,8 @@ Features:
1415
- Callback creation
1516

1617

17-
Creating a Class
18-
----------------
18+
Creating a Class
19+
----------------
1920

2021
The following creates a Monster class, static, and prototype members.
2122
The prototype init is called as the constructor. Every time a monster instance is created, the static count is incremented:
@@ -60,10 +61,10 @@ Features:
6061

6162
dragon.fight();
6263
console.log(dagon.health); // health = 8
64+
6365

64-
65-
Inheritance
66-
-----------
66+
Inheritance
67+
-----------
6768

6869
When a class is extended, all static and prototype properties are available on the new class.
6970
If you overwrite a function, you can call the base class's function by calling this._super.
@@ -89,10 +90,10 @@ Features:
8990

9091
lochNess.fight();
9192
console.log("Loch Ness fought. Health: " + lochNess.health); // -> 11
93+
9294

93-
94-
Callbacks
95-
---------
95+
Callbacks
96+
---------
9697

9798
Class provides a callback function that returns a callback to a method that will always have this set to the class or instance of the class.
9899
The following example creates a ResponseHandler class that takes the reponse text and the responses header options as constructor arguments

0 commit comments

Comments
 (0)