analyze.js 292 B

123456789101112
  1. /**
  2. * Given a criteria format, return the analyzed version.
  3. * For use with Sequelizer tests.
  4. */
  5. var Utils = require('waterline-utils');
  6. module.exports = function(expression) {
  7. var tokens = Utils.query.tokenizer(expression);
  8. var tree = Utils.query.analyzer(tokens);
  9. return tree;
  10. };