Created
June 6, 2016 17:26
-
-
Save jkap/76f72625c067c7dfe2e9c8b69228d952 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HANDCLAP = "👏"; | |
function addClaps(input) { | |
return input.split('').map(function(char) { | |
if (char === ' ') { | |
return ' ' + HANDCLAP + ' '; | |
} | |
return char; | |
}).join(''); | |
} | |
draft.content = addClaps(draft.content); | |
commit(draft); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment