Skip to content

Instantly share code, notes, and snippets.

@keropodium
Last active July 4, 2016 10:52
Show Gist options
  • Save keropodium/b832bcad6f95fc857b8312cdb0d045ce to your computer and use it in GitHub Desktop.
Save keropodium/b832bcad6f95fc857b8312cdb0d045ce to your computer and use it in GitHub Desktop.
:trollface:
String.prototype.map = function(callback) {
return (typeof callback === 'function' ? this.replace(/./g, callback) : this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment