bson 4.7.0 → 4.7.1
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 +1 -1
- package/dist/bson.browser.esm.js +5 -10
- package/dist/bson.browser.esm.js.map +1 -1
- package/dist/bson.browser.umd.js +5 -10
- package/dist/bson.browser.umd.js.map +1 -1
- package/dist/bson.bundle.js +5 -10
- package/dist/bson.bundle.js.map +1 -1
- package/dist/bson.esm.js +5 -10
- package/dist/bson.esm.js.map +1 -1
- package/lib/double.js +5 -10
- package/lib/double.js.map +1 -1
- package/package.json +1 -1
- package/src/double.ts +5 -11
package/dist/bson.esm.js
CHANGED
|
@@ -2437,22 +2437,17 @@ var Double = /** @class */ (function () {
|
|
|
2437
2437
|
if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
|
|
2438
2438
|
return this.value;
|
|
2439
2439
|
}
|
|
2440
|
-
// NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
|
|
2441
|
-
// explicitly provided `-0` then we need to ensure the sign makes it into the output
|
|
2442
2440
|
if (Object.is(Math.sign(this.value), -0)) {
|
|
2443
|
-
|
|
2441
|
+
// NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
|
|
2442
|
+
// explicitly provided `-0` then we need to ensure the sign makes it into the output
|
|
2443
|
+
return { $numberDouble: '-0.0' };
|
|
2444
2444
|
}
|
|
2445
|
-
var $numberDouble;
|
|
2446
2445
|
if (Number.isInteger(this.value)) {
|
|
2447
|
-
$numberDouble
|
|
2448
|
-
if ($numberDouble.length >= 13) {
|
|
2449
|
-
$numberDouble = this.value.toExponential(13).toUpperCase();
|
|
2450
|
-
}
|
|
2446
|
+
return { $numberDouble: "".concat(this.value, ".0") };
|
|
2451
2447
|
}
|
|
2452
2448
|
else {
|
|
2453
|
-
$numberDouble
|
|
2449
|
+
return { $numberDouble: "".concat(this.value) };
|
|
2454
2450
|
}
|
|
2455
|
-
return { $numberDouble: $numberDouble };
|
|
2456
2451
|
};
|
|
2457
2452
|
/** @internal */
|
|
2458
2453
|
Double.fromExtendedJSON = function (doc, options) {
|