cleanup
This commit is contained in:
parent
a7798c4497
commit
727c94c90a
1 changed files with 10 additions and 21 deletions
|
|
@ -31,28 +31,17 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.inherits = (function() {
|
exports.inherits = function(ctor, superCtor) {
|
||||||
var createObject = Object.create || function(prototype, properties) {
|
ctor.super_ = superCtor;
|
||||||
var Type = function () {};
|
ctor.prototype = Object.create(superCtor.prototype, {
|
||||||
Type.prototype = prototype;
|
constructor: {
|
||||||
object = new Type();
|
value: ctor,
|
||||||
object.__proto__ = prototype;
|
enumerable: false,
|
||||||
if (typeof properties !== 'undefined' && Object.defineProperties) {
|
writable: true,
|
||||||
Object.defineProperties(object, properties);
|
configurable: true
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
return function(ctor, superCtor) {
|
};
|
||||||
ctor.super_ = superCtor;
|
|
||||||
ctor.prototype = createObject(superCtor.prototype, {
|
|
||||||
constructor: {
|
|
||||||
value: ctor,
|
|
||||||
enumerable: false,
|
|
||||||
writable: true,
|
|
||||||
configurable: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}());
|
|
||||||
|
|
||||||
exports.mixin = function(obj, mixin) {
|
exports.mixin = function(obj, mixin) {
|
||||||
for (var key in mixin) {
|
for (var key in mixin) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue