1.1.1 • Published 4 years ago

simple-shallow-diff-ts v1.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

Simple implementation in Typescript of shallow diff.

Add the library to your project

npm i simple-shallow-diff-ts

Import and use

import {diff} from 'simple-shallow-diff-ts/diff';

diff(
    { a: 1, b: 2, c: 3 },
    { a: 10,      c: 3, d: 4 },
);
// It will return
{
    added: ['d'], 
    updated: ['a'], 
    deleted: ['b']
}

Test

yarn install
yarn test