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