Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including immutable-merge with all npm packages installed. Try it out:

var immutableMerge = require("immutable-merge")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

immutable-merge v0.1.4

Allows you to merge objects without mutating them.

immutable-merge Build Status

Allows you to merge objects without mutating them. It would be the equivalent to:

Object.assign({}, object1, object2);

The difference is that with immutable-merge you won't need to remember to add the {} in order to make the "merge" without mutating the original objects.


npm install immutable-merge --save


var merge = require('immutable-merge');

merge({bar: 1}, {baz: 2});
//=> {bar: 1, baz: 2}


npm test


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.1.4 Initial release
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free