|
Last change
on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
340 bytes
|
| Line | |
|---|
| 1 | export default function(constructor, factory, prototype) {
|
|---|
| 2 | constructor.prototype = factory.prototype = prototype;
|
|---|
| 3 | prototype.constructor = constructor;
|
|---|
| 4 | }
|
|---|
| 5 |
|
|---|
| 6 | export function extend(parent, definition) {
|
|---|
| 7 | var prototype = Object.create(parent.prototype);
|
|---|
| 8 | for (var key in definition) prototype[key] = definition[key];
|
|---|
| 9 | return prototype;
|
|---|
| 10 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.