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

inherits-ex

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inherits-ex - npm Package Compare versions

Comparing version 2.1.0-alpha.8 to 2.1.0-alpha.9

21

lib/_clone.js

@@ -43,6 +43,14 @@ "use strict";

var _default = _clone;
/**
* Clone the constructor(static members) to dest
*
* **Note**: 'length', 'name', 'arguments', 'caller', 'prototype', 'super_', '__super__' members are not cloned.
* @param {Function} dest
* @param {Function} src
* @param {Function} [filter]
*/
exports.default = _default;
function cloneCtor(dest, src, filter) {
const filterFn = function (name, value) {
if (['length', 'name', 'arguments', 'caller', 'prototype', 'super_', '__super__'].includes(name)) {
if (['length', 'name', 'arguments', 'caller', 'prototype', 'super_', '__super__', '__proto__'].includes(name)) {
return;

@@ -57,5 +65,14 @@ }

}
/**
* Clone the constructor's prototype to dest
*
* **Note**: 'Class', 'constructor' members are not cloned.
* @param {Function} dest
* @param {Function} src
* @param {Function} [filter]
*/
function clonePrototype(dest, src, filter) {
const filterFn = function (name, value) {
if (['Class', 'constructor'].includes(name)) {
if (['Class', 'constructor', '__proto__'].includes(name)) {
return;

@@ -62,0 +79,0 @@ }

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/snowyu/inherits-ex.js",
"version": "2.1.0-alpha.8",
"version": "2.1.0-alpha.9",
"author": {

@@ -8,0 +8,0 @@ "name": "Riceball LEE",

@@ -48,3 +48,3 @@ const getOwnPropertyNames = Object.getOwnPropertyNames;

const filterFn = function (name, value) {
if (['length', 'name', 'arguments', 'caller', 'prototype', 'super_', '__super__'].includes(name)) {return}
if (['length', 'name', 'arguments', 'caller', 'prototype', 'super_', '__super__', '__proto__'].includes(name)) {return}
if (value !== undefined && filter) {value = filter(name, value)}

@@ -66,3 +66,3 @@ return value;

const filterFn = function (name, value) {
if (['Class', 'constructor'].includes(name)) {return}
if (['Class', 'constructor', '__proto__'].includes(name)) {return}
if (value !== undefined && filter) {value = filter(name, value)}

@@ -69,0 +69,0 @@ return value;

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