How to use the Double function from mongodb

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

27
28
29
30
31
32
33
34
35
36

// expose bson stuff visible in the shell
module.exports.Binary = mongodb.Binary
module.exports.Code = mongodb.Code
module.exports.DBRef = mongodb.DBRef
module.exports.Double = mongodb.Double
module.exports.Int32 = mongodb.Int32
module.exports.Long = mongodb.Long
module.exports.MaxKey = mongodb.MaxKey
module.exports.MinKey = mongodb.MinKey
fork icon272
star icon0
watch icon59

+ 15 other calls in file

366
367
368
369
370
371
372
373
374
375
});

it('untransforms mongodb number types', done => {
  const input = {
    long: mongodb.Long.fromNumber(Number.MAX_SAFE_INTEGER),
    double: new mongodb.Double(Number.MAX_VALUE),
  };
  const output = transform.mongoObjectToParseObject(null, input, {
    fields: {
      long: { type: 'Number' },
fork icon0
star icon0
watch icon1