File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ jQuery inherit plugin
33Plugin provides "class" and inheritance implementation.
44It 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+
610Example
711-------
812``` javascript
Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments