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