INNER CODE UNIT · JavaScript

ObjectId

mongoist/mongoist · index.js:39

function ObjectId(...args) {
  return new mongodb.ObjectId(...args);
}
Object.setPrototypeOf(ObjectId, mongodb.ObjectId);
ObjectId.prototype = mongodb.ObjectId.prototype;

// expose prototypes
module.exports.Database = Database;
module.exports.Collection = Collection;
module.exports.Cursor = Cursor;
module.exports.Bulk = Bulk;

// expose bson stuff visible in the shell
module.exports.Binary = mongodb.Binary;
module.exports.Code = mongodb.Code;
module.exports.DBRef = mongodb.DBRef;
module.exports.Double = mongodb.Double;
module.exports.Long = mongodb.Long;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…