git ssb

0+

cel-desktop / ssb-pkg



Tree: e9d9dec1d00ff365112ca0f981bbda15e3682528

Files: e9d9dec1d00ff365112ca0f981bbda15e3682528 / 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