How would you do this? Instinctively, I want to do:
var myMap = new Map([["thing1", 1], ["thing2", 2], ["thing3", 3]]);
// wishful, ignorant thinking
var newMap = myMap.map((key, value) => value + 1); // Map { 'thing1' => 2, 'thing2' => 3, 'thing3' => 4 }
I've haven't gleaned much from the documentation on the new iteration protocol.
I am aware of wu.js, but I'm running a Babel project and don't want to include Traceur, which it seems like it currently depends on.
I also am a bit clueless as to how to extract how fitzgen/wu.js did it into my own project.
Would love a clear, concise explanation of what I'm missing here. Thanks!
Docs for ES6 Map, FYI