Comparing version
@@ -25,3 +25,3 @@ { | ||
], | ||
"version": "4.7.1" | ||
"version": "4.7.2" | ||
} |
@@ -45,10 +45,7 @@ "use strict"; | ||
// explicitly provided `-0` then we need to ensure the sign makes it into the output | ||
return { $numberDouble: '-0.0' }; | ||
return { $numberDouble: "-".concat(this.value.toFixed(1)) }; | ||
} | ||
if (Number.isInteger(this.value)) { | ||
return { $numberDouble: "".concat(this.value, ".0") }; | ||
} | ||
else { | ||
return { $numberDouble: "".concat(this.value) }; | ||
} | ||
return { | ||
$numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString() | ||
}; | ||
}; | ||
@@ -55,0 +52,0 @@ /** @internal */ |
@@ -18,3 +18,3 @@ { | ||
"types": "bson.d.ts", | ||
"version": "4.7.1", | ||
"version": "4.7.2", | ||
"author": { | ||
@@ -21,0 +21,0 @@ "name": "The MongoDB NodeJS Team", |
@@ -58,10 +58,8 @@ import type { EJSONOptions } from './extended_json'; | ||
// explicitly provided `-0` then we need to ensure the sign makes it into the output | ||
return { $numberDouble: '-0.0' }; | ||
return { $numberDouble: `-${this.value.toFixed(1)}` }; | ||
} | ||
if (Number.isInteger(this.value)) { | ||
return { $numberDouble: `${this.value}.0` }; | ||
} else { | ||
return { $numberDouble: `${this.value}` }; | ||
} | ||
return { | ||
$numberDouble: Number.isInteger(this.value) ? this.value.toFixed(1) : this.value.toString() | ||
}; | ||
} | ||
@@ -68,0 +66,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2875624
-0.01%39376
-0.04%