New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-construct-super

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-construct-super - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

12

can-construct-super.js

@@ -43,6 +43,14 @@ /* global require, module */

// Check if we're overwriting an existing function
addTo[name] = isFunction(val) && isFunction(base[name]) && fnTest.test(val) ?
getSuper(base, name, val) : val;
var baseDescriptor = Object.getOwnPropertyDescriptor(base, name);
var baseValue = baseDescriptor && baseDescriptor.value;
Object.defineProperty(addTo, name, {
value: isFunction(val) && isFunction(baseValue) && fnTest.test(val) ?
getSuper(base, name, val) : val,
configurable: true,
enumerable: true,
writable: true
});
};
module.exports = Construct;

2

package.json
{
"name": "can-construct-super",
"version": "3.0.0",
"version": "3.0.1",
"description": "Provides a reference to the prototypal parent using this._super in can-construct objects",

@@ -5,0 +5,0 @@ "main": "can-construct-super",

@@ -96,1 +96,19 @@ /* global require, test, stop, start, expect, equal, Promise */

QUnit.test("setters not invoked on extension (#9)", function(){
var extending = true;
var Base = Construct.extend("Base",{
set something(value){
QUnit.ok(!extending, "set not called when not extending");
},
get something(){
QUnit.ok(!extending, "get not called when not extending");
}
});
Base.extend("Extended",{
something: "value"
});
extending = false;
new Base().something = "foo";
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc