objectid.js 462 B

12345678910111213141516171819202122232425262728
  1. /*!
  2. * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId
  3. * @constructor NodeMongoDbObjectId
  4. * @see ObjectId
  5. */
  6. 'use strict';
  7. const ObjectId = require('bson').ObjectID;
  8. /*!
  9. * Getter for convenience with populate, see gh-6115
  10. */
  11. Object.defineProperty(ObjectId.prototype, '_id', {
  12. enumerable: false,
  13. configurable: true,
  14. get: function() {
  15. return this;
  16. }
  17. });
  18. /*!
  19. * ignore
  20. */
  21. module.exports = exports = ObjectId;