Browser friendly package that converts twitter's API tweet objects text property to HTML. Takes care of all the entities and its links. Handles emoji's.
http://blessanmathew.com/tweet-to-html
npm install tweet-to-html -S
There is only one method named parse
. You can pass in a tweet object or an array of objects. The response will be object/array tweet object with a new property named html
with the parsed output.
var tweetToHTML = require('tweet-to-html');
var result = tweetToHTML.parse(tweetObj); //Single tweet object
var results = tweetToHTML.parse(tweetArr); //Multiple tweets in an array
//output
console.log(result.html);
console.log(results[0].html);
##Issues Or Contributions
- Post issues/enhancements in the github issue tracker.
- My email is [email protected]
- Pull requests are welcome.
- Follow Me On Twitter
- LinkedIn Pofile
- Stack Overflow Pofile