Validates a MongoDB aggregation pipeline stage.
The main module exposes two functions: accepts(stageStr) and parse(stageStr).
The accepts(stageStr) function takes a pipeline stage string and returns true if the
string is a valid MongoDB pipeline stage, false otherwise.
Example:
var accepts = require('compass-stage-validator').accepts;
var assert = require('assert');
assert.ok(accepts('{"$limit": 1}'));
assert.ok(accepts('{"match": {"x": 35}}'));
assert.equal(accepts('{"$invalid": "key"}'), false);mongodb-query-parserValidate and parse MongoDB queries and projectionsmongodb-language-modelWork with rich AST's of MongoDB queries@mongodb-js/compass-aggregationsMongoDB Compass UI Plugin for building and debugging aggregation pipelines.
Apache 2.0
