min_key.js 456 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. /**
  3. * A class representation of the BSON MinKey type.
  4. */
  5. class MinKey {
  6. /**
  7. * Create a MinKey type
  8. *
  9. * @return {MinKey} A MinKey instance
  10. */
  11. constructor() {}
  12. /**
  13. * @ignore
  14. */
  15. toExtendedJSON() {
  16. return { $minKey: 1 };
  17. }
  18. /**
  19. * @ignore
  20. */
  21. static fromExtendedJSON() {
  22. return new MinKey();
  23. }
  24. }
  25. Object.defineProperty(MinKey.prototype, '_bsontype', { value: 'MinKey' });
  26. module.exports = MinKey;