Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

int_32.js 604B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * A class representation of a BSON Int32 type.
  3. *
  4. * @class
  5. * @param {number} value the number we want to represent as an int32.
  6. * @return {Int32}
  7. */
  8. var Int32 = function(value) {
  9. if (!(this instanceof Int32)) return new Int32(value);
  10. this._bsontype = 'Int32';
  11. this.value = value;
  12. };
  13. /**
  14. * Access the number value.
  15. *
  16. * @method
  17. * @return {number} returns the wrapped int32 number.
  18. */
  19. Int32.prototype.valueOf = function() {
  20. return this.value;
  21. };
  22. /**
  23. * @ignore
  24. */
  25. Int32.prototype.toJSON = function() {
  26. return this.value;
  27. };
  28. module.exports = Int32;
  29. module.exports.Int32 = Int32;