$ npm install map.prototype.tojson
ES7 map.prototype.tojson polyfill
$ npm install --save map.prototype.tojson
require('map.prototype.tojson'); var myMap = new Map(); myMap.set(NaN, "not a number"); console.log(myMap.toJSON()); // {"NaN":"not a number"}
MIT © hemanth