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.1 to 3.0.2

.travis.yml

18

can-construct-super.js

@@ -40,6 +40,22 @@ /* global require, module */

var getPrototypeOf = Object.getPrototypeOf || function(obj){
return obj.__proto__; // jshint ignore:line
};
var getPropertyDescriptor = Object.getPropertyDescriptor || function(subject, name) {
if(name in subject) {
var pd = Object.getOwnPropertyDescriptor(subject, name);
var proto = getPrototypeOf(subject);
while (pd === undefined && proto !== null) {
pd = Object.getOwnPropertyDescriptor(proto, name);
proto = getPrototypeOf(proto);
}
return pd;
}
};
// overwrites a single property so it can still call super
Construct._overwrite = function (addTo, base, name, val) {
// Check if we're overwriting an existing function
var baseDescriptor = Object.getOwnPropertyDescriptor(base, name);
var baseDescriptor = getPropertyDescriptor(base, name);
var baseValue = baseDescriptor && baseDescriptor.value;

@@ -46,0 +62,0 @@

2

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

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

@@ -114,1 +114,14 @@ /* global require, test, stop, start, expect, equal, Promise */

});
QUnit.test("_super isn't always available (#11)", function(){
var Parent = Construct.extend({
});
var Child = Parent.extend({
init: function () {
this._super();
ok(true);
}
});
new Child();
});
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