map-tojson
Rejected ESNext Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON
This polyfill is spec-compliant (based on the spec so far). It will work in every engine in which Map exists natively, or where it is polyfilled with the (es6-shim)es6-shim-url
Example
var mapToJSON = ;var assert = ;var items = 'a' 'b' 'c';var entries = 1 2 3 4; assert;assert;assert;assert;assert;assert;assert;assert;assert; mapToJSON;assert;assert;
Tests
Simply clone the repo, npm install
, and run npm test