bson 6.9.0 → 6.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bson.bundle.js +9 -3
- package/lib/bson.bundle.js.map +1 -1
- package/lib/bson.cjs +9 -3
- package/lib/bson.cjs.map +1 -1
- package/lib/bson.mjs +9 -3
- package/lib/bson.mjs.map +1 -1
- package/lib/bson.rn.cjs +9 -3
- package/lib/bson.rn.cjs.map +1 -1
- package/package.json +2 -2
- package/src/utils/number_utils.ts +17 -8
package/lib/bson.mjs
CHANGED
|
@@ -2256,9 +2256,15 @@ const NumberUtils = {
|
|
|
2256
2256
|
source[offset] * 16777216);
|
|
2257
2257
|
},
|
|
2258
2258
|
getBigInt64LE(source, offset) {
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2261
|
-
|
|
2259
|
+
const hi = BigInt(source[offset + 4] +
|
|
2260
|
+
source[offset + 5] * 256 +
|
|
2261
|
+
source[offset + 6] * 65536 +
|
|
2262
|
+
(source[offset + 7] << 24));
|
|
2263
|
+
const lo = BigInt(source[offset] +
|
|
2264
|
+
source[offset + 1] * 256 +
|
|
2265
|
+
source[offset + 2] * 65536 +
|
|
2266
|
+
source[offset + 3] * 16777216);
|
|
2267
|
+
return (hi << BigInt(32)) + lo;
|
|
2262
2268
|
},
|
|
2263
2269
|
getFloat64LE: isBigEndian
|
|
2264
2270
|
? (source, offset) => {
|