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

immutablepatch

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutablepatch

Apply RFC 6902 style patches to Immutable.JS data structures

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
281
decreased by-23.85%
Maintainers
1
Weekly downloads
 
Created
Source

Immutable Patch

Apply RFC 6902 style patches to Immutable.JS data structures, such as Maps, Lists, and Sets.

Getting Started

You may get the module via npm:

npm install immutablepatch

And apply JSON patches to an immutable JSON object:

var Immutable = require('immutable');
var patch = require('immutablepatch');

var list = Immutable.fromJS([1, 2, [3, 4]]);
var ops = Immutable.fromJS([
  {op: 'replace', path: '/2/1', value: 10}
]);

var result = patch(list, ops);
// var expected = Immutable.fromJS([1, 2, [3, 10]]);

You will probably need immutablediff to generate diff operations.

Keywords

FAQs

Package last updated on 06 Jan 2017

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