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