1 var BSON = require('./lib/bson/bson'),
2 Binary = require('./lib/bson/binary'),
3 Code = require('./lib/bson/code'),
4 DBRef = require('./lib/bson/db_ref'),
5 Decimal128 = require('./lib/bson/decimal128'),
6 Double = require('./lib/bson/double'),
7 Int32 = require('./lib/bson/int_32'),
8 Long = require('./lib/bson/long'),
9 Map = require('./lib/bson/map'),
10 MaxKey = require('./lib/bson/max_key'),
11 MinKey = require('./lib/bson/min_key'),
12 ObjectId = require('./lib/bson/objectid'),
13 BSONRegExp = require('./lib/bson/regexp'),
14 Symbol = require('./lib/bson/symbol'),
15 Timestamp = require('./lib/bson/timestamp');
18 BSON.BSON_INT32_MAX = 0x7FFFFFFF;
19 BSON.BSON_INT32_MIN = -0x80000000;
21 BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
22 BSON.BSON_INT64_MIN = -Math.pow(2, 63);
24 // JS MAX PRECISE VALUES
25 BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
26 BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
28 // Add BSON types to function creation
32 BSON.Decimal128 = Decimal128;
39 BSON.ObjectId = ObjectId;
40 BSON.ObjectID = ObjectId;
41 BSON.BSONRegExp = BSONRegExp;
43 BSON.Timestamp = Timestamp;
46 module.exports = BSON;