Created
November 9, 2018 17:05
-
-
Save cuuupid/6b7a7aee6da292bff56a80294423ebdb to your computer and use it in GitHub Desktop.
automatically linkedinify any text.
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 linkedinify = bropost => | |
| bropost.split(/ |\n/g) | |
| .map((post, i) => i % 5 == 0 ? post.toUpperCase() : post.toLowerCase()) | |
| .join(' ').split(/(?=\.|!|\?)/g).join('\n\n') | |
| + '\n\n' + bropost.split(/ |\n/g).map(word => '#' + word).join(' ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment