2.1.2 • Published 6 years ago

array-comparator v2.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

NPM version Build Status Dependency Status

The best module ever.

Install

$ npm install array-comparator --save

##Description Comparator for use with the chrysalis framework: https://github.com/APPrise-Mobile/chrysalis This is the module used to determine what documents need to be created, based on a comparative array of documents the endpoint database already contains, and an array of comparative keys to compare. These keys are usually unique identifiers for each document, the framework will then check to see if the value of the compareKey exists on any of the documents from the compare array. If it doesn't exists, then the document is marked for creation.

Support for update and deletion coming soon.

Usage

var arrayComparator = require('array-comparator');
var chrysalis = require('chrysalis');

var options = {
  comparativeKeys: ['integrationId'],
  comparativeArray: mongoData
};
var comparator = arrayComparator(options);

var chrysis = chrysalis();
chrysis.setComparator(comparator);

License

MIT © APPrise-Mobile

2.1.2

6 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago