In fact there should be a common interface that iterables should implement. I 
think this could have been proposed before. This way there would be not more 
common methods proposals.
On may. 17 2018, at 10:16 am, Ben Fletcher <bfle...@gmail.com> wrote:

Consider adding the array .map() implementation directly to the String 
prototype.

Here is a possible polyfill:

String.prototype.map = function (fn) {
return Array.prototype.map
.call(this, fn)
.join('');
}

This replaces the common pattern of splitting, mapping, joining strings for 
processing.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
      Libre de virus. 
www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to