A simple converter that deep converts your JavaScript Object into Map. That means that if any property anywhere in your object is also an object, it will be also converted into map.
Reasons why using Map is better than using Objects can be found in this Medium post.
const convertToMap = require("convert-to-map");
const val = {...}
const asMap = convertToMap(val);
If you pass non-object value, function throws an error.