array-comparator
The best module ever.
Last updated 2 years ago by indicium .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install array-comparator 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.1.2                                ...           latest (2 years ago)

8 Versions

  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (12)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |