A JavaScript data munging pipeline based on the MongoDB aggregation framework.
TODO: document the major exports and a little about each here
Here is a list of the major items where I have deviated from the MongoDB code and why:
Value
now provides static helpers rather than instance helpers since that seems to make more sense hereValue#get{TYPE}
methods have been renamed to Value.verify{TYPE}
since that seemed to make more sense given what they're really doing for us as staticsValue.coerceToDate
static returns a JavaScript Date
object rather than milliseconds since that seems to make more sense where possibleExpression{FOO}
classes have all been renamed to {FOO}Expression
to satisfy my naming OCD.{FOO}Expression
classes do not provide create
statics since calling new is easy enough
CompareExpression
class doesn't provide any of it's additional create{FOO}
helpers so instead I'm binding the appropriate args to the ctorHere is a list of global items that I know about that may need to be done in the future:
getOpName
should be static!BSON
types to do everything properly; affects handling of ObjectId
, ISODate
, and Timestamp
assert.equal()
calls into assert.strictEqual()
callsexports = module.exports =
with module.exports =
onlythrow
and make them actually use UserException
vs SystemException
(or whatever they're called)