comparisons
v3.0.1
Published
yarn add comparisons ```
Downloads
53
Readme
# Or use npm install
yarn add comparisons
const Comparison = require('comparisons');
const tests = ['foo=bar', 'num>=2', '!quuz'];
const stub = { foo: 'bar', num: 3 };
const runner = new Comparison(tests);
runner.eval(stub); // returns true or false
runner.query(); // returns a Mongo friendly query