Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff function #256

Closed
y0hami opened this issue Aug 30, 2019 · 1 comment
Closed

diff function #256

y0hami opened this issue Aug 30, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@y0hami
Copy link
Owner

y0hami commented Aug 30, 2019

Add diff function

Diff 2 objects

const a = {
  a: 1,
  b: 2,
  c: 3
};

const b = {
  a: 2,
  c: 3,
  d: 4
};

diff(a, b);
// {
//   "removal": {
//     "total": 1,
//     "keys": [
//       "b"
//     ]
//   },
//   "addition": {
//     "total": 1,
//     "keys": [
//       "d"
//     ]
//   },
//   "changes": {
//     "total": 1,
//     "keys": [
//       "a"
//     ]
//   },
//   "original": {
//     "a": 1,
//     "b": 2,
//     "c": 3
//   },
//   "changed": {
//     "a": 2,
//     "c": 3,
//     "d": 4
//   }
// }
@y0hami y0hami added the enhancement New feature or request label Aug 30, 2019
@y0hami
Copy link
Owner Author

y0hami commented Sep 4, 2019

After some prototyping this is kinda pointless/useless

@y0hami y0hami closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant