Comparing version 2.6.0 to 2.7.0
28
index.js
'use strict'; | ||
var overrider = require('overrider'); | ||
/** @namespace extend-me **/ | ||
@@ -87,5 +85,5 @@ | ||
*/ | ||
Constructor.extend = extend; | ||
Constructor.getClassName = getClassName; | ||
@@ -108,3 +106,9 @@ /** | ||
overrider(prototype, prototypeAdditions); | ||
// define each prototype addition on the prototype (including getter/setters) | ||
var key, descriptor; | ||
for (key in prototypeAdditions) { | ||
if ((descriptor = Object.getOwnPropertyDescriptor(prototypeAdditions, key))) { | ||
Object.defineProperty(prototype, key, descriptor); | ||
} | ||
} | ||
@@ -123,2 +127,10 @@ if (typeof this.postExtend === 'function') { | ||
getClassName: function() { | ||
return ( | ||
this.$$CLASS_NAME || | ||
this.name || | ||
this.constructor.name // try Function.prototype.name as last resort | ||
); | ||
}, | ||
/** | ||
@@ -211,2 +223,10 @@ * Access a member of the super class. | ||
function getClassName() { | ||
return ( | ||
this.prototype.$$CLASS_NAME || | ||
this.prototype.name || | ||
this.name // try Function.prototype.name as last resort | ||
); | ||
} | ||
function parentConstructor(ancestorConstructorName) { | ||
@@ -213,0 +233,0 @@ var prototype = this.prototype; |
{ | ||
"name": "extend-me", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"main": "index.js", | ||
@@ -15,5 +15,2 @@ "description": "A class extender", | ||
"license": "MIT", | ||
"dependencies": { | ||
"overrider": "^0" | ||
}, | ||
"devDependencies": { | ||
@@ -20,0 +17,0 @@ "browser-sync": "^2.10.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17968
0
210
- Removedoverrider@^0
- Removedoverrider@0.3.0(transitive)