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

object-path-immutable

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-path-immutable - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

14

package.json
{
"name": "object-path-immutable",
"version": "4.1.0",
"version": "4.1.1",
"description": "Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.",

@@ -30,14 +30,14 @@ "author": "Mario Casciaro <m@mario.fyi>",

"is-plain-object": "^3.0.0",
"object-path": "^0.11.4"
"object-path": "^0.11.5"
},
"devDependencies": {
"chai": "^4.2.0",
"coveralls": "^3.0.9",
"nyc": "^15.0.0",
"mocha": "^7.0.1",
"coveralls": "^3.1.0",
"nyc": "^15.1.0",
"mocha": "^8.2.0",
"mocha-lcov-reporter": "^1.3.0",
"rollup": "^1.30.1",
"rollup": "^1.32.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"standard": "^14.3.1"
"standard": "^14.3.4"
},

@@ -44,0 +44,0 @@ "keywords": [

@@ -136,4 +136,11 @@ (function (global, factory) {

function hasShallowProperty(obj, prop) {
return (options.includeInheritedProps || (typeof prop === 'number' && Array.isArray(obj)) || hasOwnProperty(obj, prop))
var hasShallowProperty;
if (options.includeInheritedProps) {
hasShallowProperty = function () {
return true
};
} else {
hasShallowProperty = function (obj, prop) {
return (typeof prop === 'number' && Array.isArray(obj)) || hasOwnProperty(obj, prop)
};
}

@@ -159,2 +166,6 @@

var currentValue = getShallowProperty(obj, currentPath);
if (options.includeInheritedProps && (currentPath === '__proto__' ||
(currentPath === 'constructor' && typeof currentValue === 'function'))) {
throw new Error('For security reasons, object\'s magic properties cannot be set')
}
if (path.length === 1) {

@@ -161,0 +172,0 @@ if (currentValue === void 0 || !doNotReplace) {

Sorry, the diff of this file is not supported yet

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