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.cjs CHANGED
@@ -2836,8 +2836,14 @@ function calculateElement(name, value, serializeFunctions = false, isArray = fal
2836
2836
  ByteUtils.utf8ByteLength(value.toString()) +
2837
2837
  1);
2838
2838
  }
2839
+ return 0;
2840
+ case 'bigint':
2841
+ return (name != null ? ByteUtils.utf8ByteLength(name) + 1 : 0) + (8 + 1);
2842
+ case 'symbol':
2843
+ return 0;
2844
+ default:
2845
+ throw new BSONError(`Unrecognized JS type: ${typeof value}`);
2839
2846
  }
2840
- return 0;
2841
2847
  }
2842
2848
 
2843
2849
  function alphabetize(str) {