bson 6.10.1 → 6.10.2
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 +7 -1
- package/lib/bson.bundle.js.map +1 -1
- package/lib/bson.cjs +7 -1
- package/lib/bson.cjs.map +1 -1
- package/lib/bson.mjs +7 -1
- package/lib/bson.mjs.map +1 -1
- package/lib/bson.rn.cjs +7 -0
- package/lib/bson.rn.cjs.map +1 -1
- package/package.json +1 -1
- package/src/parser/calculate_size.ts +8 -1
package/lib/bson.mjs
CHANGED
|
@@ -2834,8 +2834,14 @@ function calculateElement(name, value, serializeFunctions = false, isArray = fal
|
|
|
2834
2834
|
ByteUtils.utf8ByteLength(value.toString()) +
|
|
2835
2835
|
1);
|
|
2836
2836
|
}
|
|
2837
|
+
return 0;
|
|
2838
|
+
case 'bigint':
|
|
2839
|
+
return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
|
|
2840
|
+
case 'symbol':
|
|
2841
|
+
return 0;
|
|
2842
|
+
default:
|
|
2843
|
+
throw new BSONError(`Unrecognized JS type: ${typeof value}`);
|
|
2837
2844
|
}
|
|
2838
|
-
return 0;
|
|
2839
2845
|
}
|
|
2840
2846
|
|
|
2841
2847
|
function alphabetize(str) {
|