I think makes sense to have String.prototype.reduce too then.
17.05.2018, 17:16, "Ben Fletcher" <bfle...@gmail.com>: > 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 _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss