-
-
Notifications
You must be signed in to change notification settings - Fork 116
2022 03 19 Use Map instead of Object
Sebastien edited this page Mar 19, 2022
·
1 revision
- Status: accepted
- Date: 2022-03-19
Technical Story: {description | ticket/issue URL}
Javascript has evolved and now propose a Map data structure It can replace the Object for data structure manipulated by algorithm
- Purpose, Map is dedicated to what we want to do
- Performance, Map allow better performance
- Implementation, Map does not come with the Object drawbacks (property intersection, object redefinition, etc)
- Migrate from Object to Map
- Stay on object
Chosen option: "Migrate from Object to Map", because of all the gain and for the right purpose of using it.
- Better performance
- Data structure tailored to our needs
- No jest matcher for Map