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.
- package/bower.json +1 -1
- package/dist/bson.browser.esm.js +4 -7
- package/dist/bson.browser.esm.js.map +1 -1
- package/dist/bson.browser.umd.js +4 -7
- package/dist/bson.browser.umd.js.map +1 -1
- package/dist/bson.bundle.js +4 -7
- package/dist/bson.bundle.js.map +1 -1
- package/dist/bson.esm.js +4 -7
- package/dist/bson.esm.js.map +1 -1
- package/lib/double.js +4 -7
- package/lib/double.js.map +1 -1
- package/package.json +1 -1
- package/src/double.ts +4 -6
package/dist/bson.esm.js
CHANGED
|
@@ -2440,14 +2440,11 @@ var Double = /** @class */ (function () {
|
|
|
2440
2440
|
if (Object.is(Math.sign(this.value), -0)) {
|
|
2441
2441
|
// NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
|
|
2442
2442
|
// explicitly provided `-0` then we need to ensure the sign makes it into the output
|
|
2443
|
-
return { $numberDouble:
|
|
2444
|
-
}
|
|
2445
|
-
if (Number.isInteger(this.value)) {
|
|
2446
|
-
return { $numberDouble: "".concat(this.value, ".0") };
|
|
2447
|
-
}
|
|
2448
|
-
else {
|
|
2449
|
-
return { $numberDouble: "".concat(this.value) };
|
|
2443
|
+
return { $numberDouble: "-".concat(this.value.toFixed(1)) };
|
|
2450
2444
|
}
|
|
2445
|
+
return {
|
|
2446
|
+
$numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
|
|
2447
|
+
};
|
|
2451
2448
|
};
|
|
2452
2449
|
/** @internal */
|
|
2453
2450
|
Double.fromExtendedJSON = function (doc, options) {
|