UNPKG

mongostate

Version:

Data state machine. Support transaction in mongoose.

8 lines (6 loc) 322 B
const ObjectId = require('mongoose').Types.ObjectId; console.log(typeof (new ObjectId)); console.log((new ObjectId).constructor.name); console.log(({ $ne: '123456789' }).constructor.name); console.log(ObjectId('5ae3c5ed28c31e0cb2540fd6').getTimestamp()); console.log(ObjectId('5ae3c5eeb182fd6c6ec8063c').getTimestamp());