mathiasbynens / Array.from

A robust & optimized ES3-compatible polyfill for the `Array.from` method in ECMAScript 6.
https://mths.be/array-from
MIT License
67 stars 15 forks source link

Array.from(MapIterator) problem #17

Closed LinboLen closed 9 years ago

LinboLen commented 9 years ago

can you make this code work well, array.from works well in my new version chrome, but lower version browser can't support array.from, the shim should support it

var m = new Map();

m.set('strKey1',"strValue1");
m.set('strKey2',"strValue2");
m.set(function(){},"funcValue1");
m.set(function(){console.log("funcKey2")}, function(){console.log("funcValue2")});

console.log("The result is: ", Array.from(m.keys()));
console.log("The result is: ", Array.from(m.values())); 
LinboLen commented 9 years ago

I have commented in https://github.com/mathiasbynens/Array.from/issues/4

ljharb commented 9 years ago

Duplicate of #4.