Skip to content

Instantly share code, notes, and snippets.

@thiagoa
Created December 11, 2016 18:37
Show Gist options
  • Select an option

  • Save thiagoa/684f3b5095ae8409081f6ad77f9221d6 to your computer and use it in GitHub Desktop.

Select an option

Save thiagoa/684f3b5095ae8409081f6ad77f9221d6 to your computer and use it in GitHub Desktop.
import { pipe } from 'lodash/fp';
import wrapSentencesInTags from 'app/twitter/wrapSentencesInTags';
import parseLineBreaks from 'app/twitter/parseLineBreaks';
import parseTweetMentions from 'app/twitter/parseTweetMentions';
const parseText = pipe(parseTweetMentions, wrapSentencesInTags, parseLineBreaks);
export default function parseOneTweet(tweet) {
return Object.assign({}, tweet, { text: parseText(tweet) });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment