Decimal / Float in mongoose for node.js

I've searched a bit and found this article stating that for storing float values you must use Number type. You can store any float value in speed field.


Yes you can use the Decimal128 type.

https://mongoosejs.com/docs/api.html#mongoose_Mongoose-Decimal128