Match MongoDB queries, apply updates and test aggregation pipelines on local documents.
Additional Documentation Pages
Modules
Generate sorter Functions for ordering documents and leaves.
Static Functions
Locally apply a MongoDB aggregation pipeline. Does not affect the input documents. Optionally returns the results of each individual stage as well as the final result.
Arguments
An Array of stage operator specifications used to select/modify the source documents.
If true, the return value is an Array containing each Array of results produced by each stage. Otherwise the return value is the final result Array.
Returns
Return a numeric BSON type for a javascript object.
Arguments
In simpleNums mode, a Number is always of DOUBLE
type. Otherwise it will be evaluated as
potentially an integer.
Returns
Returns one of the following values:
- 0 - unknown type
- 1 - double
- 2 - string
- 3 - object
- 4 - array
- 5 - buffer
- 6 - undefined
- 7 - ObjectID
- 8 - boolean
- 9 - date
- 10 - null
- 11 - regexp
- 13 - function
- 16 - integer
- 18 - long