Skip to content

Commit fb54f52

Browse files
committed
doc for jquery.memoize added, doc for jquery.inherit fixed
1 parent 6f8e868 commit fb54f52

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/jquery.inherit/readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ jQuery inherit plugin
33
Plugin provides "class" and inheritance implementation.
44
It brings some syntax sugar for "class" declarations, constructors, "super" calls and static members.
55

6+
Usage
7+
-----
8+
var MyClass = $.inherit([myBaseClass], props, [staticProps]);
9+
610
Example
711
-------
812
```javascript

src/jquery.memoize/readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
jQuery memoize plugin
2+
=====================
3+
Plugin provides memoization technique
4+
5+
Usage
6+
-----
7+
var memoizedFunction = $.memoize(originalFunction, [custom serializer]);
8+
9+
Example
10+
-------
11+
```javascript
12+
// Simple example. Arguments are simple type (string, number, boolean)
13+
var originalFn = function(a, b, c) {
14+
// do something complex with a, b and c
15+
return result;
16+
},
17+
memoizedFn = $.memoize(originalFn);
18+
19+
var first = memoizedFn(1, "2", true), // originalFn called
20+
second = memoizedFn(1, "2", true); // originalFn not called
21+
22+
console.log(first === second); // true
23+
```

0 commit comments

Comments
 (0)