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 0.2.0 to 0.3.0

2

index.js

@@ -60,3 +60,3 @@ (function (root, factory){

proxy[prop] = function() {
var args = Array.prototype.slice.call(arguments).concat([obj])
var args = [obj].concat(Array.prototype.slice.call(arguments))
return objectPathImmutable(objectPathImmutable[prop].apply(objectPathImmutable, args))

@@ -63,0 +63,0 @@ }

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

@@ -5,0 +5,0 @@ "author": "Mario Casciaro <mariocasciaro@gmail.com>",

@@ -186,2 +186,24 @@ 'use strict';

})
})
})
describe('bind', function() {
it('should execute all methods on the bound object', function() {
var obj = {
a: {
d: 1,
f: 2
},
c: {}
}
var newObj = op(obj).set('a.q', 'q').del('a.d').value()
expect(newObj).not.to.be.equal(obj)
expect(newObj.a).not.to.be.equal(obj.a)
expect(newObj.c).to.be.equal(obj.c)
expect(newObj.a).to.be.eql({f: 2, q: 'q'})
})
})
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