git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-79-npm / bson / bson.js

288 bytesRaw
1'use strict';
2
3var bson = require('bson');
4
5var Long = bson.Long;
6var doc = { long: Long.fromNumber(100) };
7var BSON = bson.BSON;
8var obj = new (BSON)();
9var data = obj.serialize(doc, false, true, false);
10var doc2 = obj.deserialize(data);
11
12if (doc2.long === 100) {
13 console.log('ok');
14}
15

Built with git-ssb-web