프로젝트

일반

사용자정보

통계
| 개정판:

root / HServer / 00.Server / 00.Program / node_modules / bson / index.js

이력 | 보기 | 이력해설 | 다운로드 (1.42 KB)

1 39 HKM
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');
16
17
// BSON MAX VALUES
18
BSON.BSON_INT32_MAX = 0x7fffffff;
19
BSON.BSON_INT32_MIN = -0x80000000;
20
21
BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
22
BSON.BSON_INT64_MIN = -Math.pow(2, 63);
23
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.
27
28
// Add BSON types to function creation
29
BSON.Binary = Binary;
30
BSON.Code = Code;
31
BSON.DBRef = DBRef;
32
BSON.Decimal128 = Decimal128;
33
BSON.Double = Double;
34
BSON.Int32 = Int32;
35
BSON.Long = Long;
36
BSON.Map = Map;
37
BSON.MaxKey = MaxKey;
38
BSON.MinKey = MinKey;
39
BSON.ObjectId = ObjectId;
40
BSON.ObjectID = ObjectId;
41
BSON.BSONRegExp = BSONRegExp;
42
BSON.Symbol = Symbol;
43
BSON.Timestamp = Timestamp;
44
45
// Return the BSON
46
module.exports = BSON;