Skip to content

Instantly share code, notes, and snippets.

@st98
Last active August 29, 2015 14:13
Show Gist options
  • Save st98/66fecd1859745a906c7b to your computer and use it in GitHub Desktop.
Save st98/66fecd1859745a906c7b to your computer and use it in GitHub Desktop.
String#map。
Object.defineProperty(String.prototype, 'map', {
value: function () {
return Array.prototype.map.apply(this, arguments).join('');
},
enumerable: false,
configurable: true,
writable: false
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment