Socket
Socket
Sign inDemoInstall

class-utils

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-utils - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

14

index.js

@@ -331,2 +331,3 @@ 'use strict';

* @param {Function} `Parent` Parent ctor
* @param {Function} `extend` Optional extend function to handle custom extensions. Useful when updating methods that require a specific prototype.
* @param {Function} `Child` Child ctor

@@ -338,3 +339,3 @@ * @param {Object} `proto` Optionally pass additional prototype properties to inherit.

cu.extend = function extend(Parent) {
cu.extend = function extend(Parent, extend) {
if (typeof Parent !== 'function') {

@@ -363,11 +364,8 @@ throw new TypeError('expected Parent to be a function.');

Ctor.prototype.mixin = function(key, value) {
Ctor.prototype[key] = value;
};
if (typeof extend === 'function') {
extend(Ctor, Parent);
}
Ctor.extend = cu.extend(Ctor);
if (Parent.inherit) {
Ctor.inherit = Parent.inherit;
}
Ctor.extend = cu.extend(Ctor, extend);
};
};
{
"name": "class-utils",
"description": "Utils for working with JavaScript classes and prototype methods.",
"version": "0.2.3",
"version": "0.3.0",
"homepage": "https://github.com/jonschlinkert/class-utils",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc