bson 4.7.0 → 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.
package/bower.json CHANGED
@@ -22,5 +22,5 @@
22
22
  "test",
23
23
  "tools"
24
24
  ],
25
- "version": "4.7.0"
25
+ "version": "4.7.2"
26
26
  }
@@ -4471,22 +4471,14 @@ var Double = /** @class */ (function () {
4471
4471
  if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
4472
4472
  return this.value;
4473
4473
  }
4474
- // NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
4475
- // explicitly provided `-0` then we need to ensure the sign makes it into the output
4476
4474
  if (Object.is(Math.sign(this.value), -0)) {
4475
+ // NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
4476
+ // explicitly provided `-0` then we need to ensure the sign makes it into the output
4477
4477
  return { $numberDouble: "-".concat(this.value.toFixed(1)) };
4478
4478
  }
4479
- var $numberDouble;
4480
- if (Number.isInteger(this.value)) {
4481
- $numberDouble = this.value.toFixed(1);
4482
- if ($numberDouble.length >= 13) {
4483
- $numberDouble = this.value.toExponential(13).toUpperCase();
4484
- }
4485
- }
4486
- else {
4487
- $numberDouble = this.value.toString();
4488
- }
4489
- return { $numberDouble: $numberDouble };
4479
+ return {
4480
+ $numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
4481
+ };
4490
4482
  };
4491
4483
  /** @internal */
4492
4484
  Double.fromExtendedJSON = function (doc, options) {