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 +1 -1
- package/dist/bson.browser.esm.js +5 -13
- package/dist/bson.browser.esm.js.map +1 -1
- package/dist/bson.browser.umd.js +5 -13
- package/dist/bson.browser.umd.js.map +1 -1
- package/dist/bson.bundle.js +5 -13
- package/dist/bson.bundle.js.map +1 -1
- package/dist/bson.esm.js +5 -13
- package/dist/bson.esm.js.map +1 -1
- package/lib/double.js +5 -13
- package/lib/double.js.map +1 -1
- package/package.json +1 -1
- package/src/double.ts +5 -13
package/dist/bson.browser.umd.js
CHANGED
|
@@ -4477,22 +4477,14 @@
|
|
|
4477
4477
|
if (options && (options.legacy || (options.relaxed && isFinite(this.value)))) {
|
|
4478
4478
|
return this.value;
|
|
4479
4479
|
}
|
|
4480
|
-
// NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
|
|
4481
|
-
// explicitly provided `-0` then we need to ensure the sign makes it into the output
|
|
4482
4480
|
if (Object.is(Math.sign(this.value), -0)) {
|
|
4481
|
+
// NOTE: JavaScript has +0 and -0, apparently to model limit calculations. If a user
|
|
4482
|
+
// explicitly provided `-0` then we need to ensure the sign makes it into the output
|
|
4483
4483
|
return { $numberDouble: "-".concat(this.value.toFixed(1)) };
|
|
4484
4484
|
}
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
if ($numberDouble.length >= 13) {
|
|
4489
|
-
$numberDouble = this.value.toExponential(13).toUpperCase();
|
|
4490
|
-
}
|
|
4491
|
-
}
|
|
4492
|
-
else {
|
|
4493
|
-
$numberDouble = this.value.toString();
|
|
4494
|
-
}
|
|
4495
|
-
return { $numberDouble: $numberDouble };
|
|
4485
|
+
return {
|
|
4486
|
+
$numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString()
|
|
4487
|
+
};
|
|
4496
4488
|
};
|
|
4497
4489
|
/** @internal */
|
|
4498
4490
|
Double.fromExtendedJSON = function (doc, options) {
|