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

extendable-immutable

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extendable-immutable - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

8

es/util/createExtendable.js

@@ -8,3 +8,4 @@ import _typeof from 'babel-runtime/helpers/typeof';

var emptySymbol = 'empty';
var unwrappedMethods = ['constructor', 'get', 'getIn', 'first', 'last', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy'];
var unwrappedMethods = ['constructor', 'get', 'getIn', 'first', 'last', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy', 'clear' // Important! We're manually overriding this method
];

@@ -18,2 +19,7 @@ export default function createExtendable(base, copy, empty) {

// Overrides the original clear method that returns an empty object
proto.clear = function clear() {
return this.__wrapImmutable({});
};
// A method for wrapping an immutable object, with reference equality for empty objects

@@ -20,0 +26,0 @@ proto.__wrapImmutable = function __wrapImmutable(val) {

@@ -32,3 +32,4 @@ 'use strict';

var emptySymbol = 'empty';
var unwrappedMethods = ['constructor', 'get', 'getIn', 'first', 'last', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy'];
var unwrappedMethods = ['constructor', 'get', 'getIn', 'first', 'last', 'reduce', 'reduceRight', 'find', 'findLast', 'findEntry', 'findLastEntry', 'max', 'maxBy', 'min', 'minBy', 'clear' // Important! We're manually overriding this method
];

@@ -42,2 +43,7 @@ function createExtendable(base, copy, empty) {

// Overrides the original clear method that returns an empty object
proto.clear = function clear() {
return this.__wrapImmutable({});
};
// A method for wrapping an immutable object, with reference equality for empty objects

@@ -44,0 +50,0 @@ proto.__wrapImmutable = function __wrapImmutable(val) {

7

package.json
{
"name": "extendable-immutable",
"version": "1.0.12",
"version": "1.0.13",
"main": "lib/index.js",

@@ -13,2 +13,3 @@ "jsnext:main": "es/index.js",

"scripts": {
"perf": "node scripts/bench.js",
"test": "BABEL_ENV=commonjs mocha --compilers js:babel-register --recursive",

@@ -61,5 +62,7 @@ "test:watch": "npm test -- --watch",

"expect": "^1.20.2",
"glob": "^7.0.5",
"immutable": "^3.8.1",
"mocha": "^3.0.0",
"nyc": "^7.0.0"
"nyc": "^7.0.0",
"pretty-time": "^0.2.0"
},

@@ -66,0 +69,0 @@ "peerDependencies": {

@@ -20,3 +20,4 @@ import invariant from 'invariant'

'min',
'minBy'
'minBy',
'clear' // Important! We're manually overriding this method
]

@@ -33,2 +34,7 @@

// Overrides the original clear method that returns an empty object
proto.clear = function clear() {
return this.__wrapImmutable({})
}
// A method for wrapping an immutable object, with reference equality for empty objects

@@ -35,0 +41,0 @@ proto.__wrapImmutable = function __wrapImmutable(val, forceCreation = false) {

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