Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extend-interface

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extend-interface - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

49

extend-interface.js

@@ -1,18 +0,31 @@

let extendify = function(ext, supr, cls){
var copy = supr || function(){};
//var copy = function(){ return orig.apply(this, arguments) };
Object.keys(cls.prototype).forEach(function(key){
copy.prototype[key] = cls.prototype[key];
});
Object.keys(ext).forEach(function(key){
copy.prototype[key] = ext[key];
});
copy.extend = function(ext, supr){
return extendify(ext, supr, copy);
};
return copy;
}
extendify.default = extendify;
module.exports = extendify;
(function (root, factory){
if(typeof define === 'function' && define.amd){
// AMD. Register as an anonymous module.
define([], factory);
}else if (typeof module === 'object' && module.exports){
module.exports = factory();
}else{
// Browser globals (root is window)
root.extendInterface = factory();
}
}(this, function(){
let extendify = function(ext, supr, cls){
var copy = supr || function(){};
//var copy = function(){ return orig.apply(this, arguments) };
Object.keys(cls.prototype).forEach(function(key){
copy.prototype[key] = cls.prototype[key];
});
Object.keys(ext).forEach(function(key){
copy.prototype[key] = ext[key];
});
copy.extend = function(ext, supr){
return extendify(ext, supr, copy);
};
return copy;
}
extendify.default = extendify;
return extendify;
}));
{
"name": "extend-interface",
"version": "0.0.2",
"version": "0.0.3",
"main": "extend-interface.js",

@@ -5,0 +5,0 @@ "devDependencies": {

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