How to use the Double function from bson

Find comprehensive JavaScript bson.Double code examples handpicked from public code repositorys.

7
8
9
10
11
12
13
14
15
16
const Binary = bson.Binary;
const BSONRegExp = bson.BSONRegExp;
const Code = bson.Code;
const Timestamp = bson.Timestamp;
const Long = bson.Long;
const Double = bson.Double;
const Int32 = bson.Int32;
const Decimal128 = bson.Decimal128;
const TypeChecker = require('../');

fork icon121
star icon761
watch icon0

+ 7 other calls in file

46
47
48
49
50
51
52
53
54
55
/** @type {import('bson').DBRef} */
module.exports.DBRef = BSONJS.DBRef;
/** @type {import('bson').Decimal128} */
module.exports.Decimal128 = BSONJS.Decimal128;
/** @type {import('bson').Double} */
module.exports.Double = BSONJS.Double;
/** @type {import('bson').Int32} */
module.exports.Int32 = BSONJS.Int32;
/** @type {import('bson').Long} */
module.exports.Long = BSONJS.Long;
fork icon0
star icon0
watch icon0

+ 12 other calls in file

152
153
154
155
156
157
158
159
160
161
it(name, metadata, function () {
  const data = {
    a: 12,
    b: new BSON.Int32(12),
    c: new BSON.Long(12),
    d: new BSON.Double(12),
    e: /[A-Za-z0-9]*/,
    f: new BSON.BSONRegExp('[A-Za-z0-9]*'),
    g: undefined
  };
fork icon0
star icon0
watch icon0

+ 3 other calls in file