bson 4.7.1 → 4.7.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.
@@ -4477,14 +4477,11 @@ var BSON = (function (exports) {
4477
4477
  if (Object.is(Math.sign(this.value), -0)) {
4478
4478
  // NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
4479
4479
  // explicitly provided `-0` then we need to ensure the sign makes it into the output
4480
- return { $numberDouble: '-0.0' };
4481
- }
4482
- if (Number.isInteger(this.value)) {
4483
- return { $numberDouble: "".concat(this.value, ".0") };
4484
- }
4485
- else {
4486
- return { $numberDouble: "".concat(this.value) };
4480
+ return { $numberDouble: "-".concat(this.value.toFixed(1)) };
4487
4481
  }
4482
+ return {
4483
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
4484
+ };
4488
4485
  };
4489
4486
  /** @internal */
4490
4487
  Double.fromExtendedJSON = function (doc, options) {