Socket
Socket
Sign inDemoInstall

immutable-diff

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-diff

Hi-Fi diffing for Immutable.js data structures, forked from immutablediff


Version published
Weekly downloads
621
increased by2.31%
Maintainers
1
Weekly downloads
 
Created
Source

Immutable.js Diff

High Fidelity diffs for Immutable.JS objects

Forked from immutable-diff which focuses more on RFC 6902 style patches, requiring string values for the paths.

Changes from immutable-diff:
  • op.path is now an Immutable.List rather than a patch style path, usable for .updateIn
  • Support for complex values as keys
  • null & undefined are considered separate values
  • Babel/ES6 codebase

API:

diff(a, b)

Creates a diff between a and b

var Immutable = require('immutable');
var diff = require('immutable-diff');

var map1 = Immutable.Map({a:1, b:2, c:3});
var map2 = Immutable.Map({a:1, b:2, c:3, d: 4});

diff(map1, map2);
// List [ Map { op: "add", path: ["d"], value: 4 } ]

var map1 = Immutable.Map({a:1, b:2, c:3});
var map2 = Immutable.Map({a:1, b:2, c:3, d: 4});

Operations

add

A new key was added

remove

An existing key was removed

replace

An existing key was replaced with a new value

License

MIT

Keywords

FAQs

Package last updated on 25 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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