index.js 470 B

1234567891011121314
  1. var BSON = require('./ext').BSON;
  2. // BSON MAX VALUES
  3. BSON.BSON_INT32_MAX = 0x7FFFFFFF;
  4. BSON.BSON_INT32_MIN = -0x80000000;
  5. BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
  6. BSON.BSON_INT64_MIN = -Math.pow(2, 63);
  7. // JS MAX PRECISE VALUES
  8. BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
  9. BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
  10. module.exports = BSON;