-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
Use Case
Currently the deserializer will look for a toObject method defined on the Decimal128 prototype and call it after decoding a Decimal128 BSON value. We should consider if this inconsistent transformation feature is worth maintaining vs users specifying a cursor.map function.
User Impact
- This feature is undocumented
- Added: https://github.com/mongodb/js-bson/commit/aea66e3d84354baef2d0be730352bb93d5dae63f
Acceptance Criteria
Implementation Requirements
- Remove the logic that looks for a toObject function on the prototype of Decimal128.
Testing Requirements
- Change the test that asserts this transform behavior to one that would fail if the feature were to be added back.
Documentation Requirements
- Note the change in the major release.
- NOTE: There is nothing we can annotate in our API docs to deprecate this behavior. Ensure we make note of the change in the migration guide / major version changes docs.