Coder Social home page Coder Social logo

seamless-immutable-diff's Introduction

seamless-immutable-diff Build Status

Given two objects, get the seamless-immutable-diff between them

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install seamless-immutable-diff --save

Usage

import diff from 'seamless-immutable-diff';
import Immutable from 'seamless-immutable';

const from = Immutable({ beep: { boop: true }, foo: { bar: false } });
const to = { beep: { hello: 'world' }, foo: { bar: false } };
const result = diff(from, to);

// will be true since from.foo is deep equal to to.foo
console.log(from.foo === result.foo);
// will be a seamless-immutable object { hello: 'world' }
console.log(result.beep);

Tests

npm install
npm test

Dependencies

  • dift: Super fast list diff algorithm
  • immutable-array-methods: Immutable versions of normally mutable array methods, such as pop(), push(), splice()

Dev Dependencies

  • ava: Futuristic test runner ๐Ÿš€
  • babel-cli: Babel command line.
  • babel-core: Babel compiler core.
  • babel-preset-es2015: Babel preset for all es2015 plugins.
  • nyc: a code coverage tool that works well with subprocesses.
  • package-json-to-readme: Generate a README.md from package.json contents
  • seamless-immutable: Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
  • semistandard: All the goodness of feross/standard with semicolons sprinkled on top.
  • snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output

License

MIT

Generated by package-json-to-readme

seamless-immutable-diff's People

Contributors

kesla avatar greenkeeperio-bot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.