3.0.0 • Published 4 years ago

redis-diff v3.0.0

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

redis-diff

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Perform a difference comparison backed by redis.

Install

$ npm install redis-diff --save

Usage

const diff = createDiff()
const noop = () => {}

diff.set({
  key: 'mykey',
  value: [
    { id: 1, foo: 'bar' },
    { id: 1, foo: 'barz' },
    { id: 1, foo: 'baaz' }
  ]
}, noop)

diff.compare({
  key: 'mykey',
  value: [
    { id: 1, foo: 'bar' },
    { id: 1, foo: 'baarz' },
    { id: 1, foo: 'bax' }
  ],
  ids: ['id', 'foo']
}, console.log)

// {
//   added: [ { id: 1, foo: 'baarz' }, { id: 1, foo: 'bax' } ],
//   removed: [ { id: 1, foo: 'barz' }, { id: 1, foo: 'baaz' } ],
//   common: [ { id: 1, foo: 'bar' } ]
// }

License

MIT © Kiko Beats.

3.0.0

4 years ago

2.0.2

5 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago