This file contains 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
const indicatorClasses = classNames({ | |
'indicator--warn': this.state.body.length > 120 && body.length <= 140, | |
'indicator--error': this.state.body.length > 140, | |
}); | |
return (<span className={indicatorClasses}>{140 - this.state.body.length}</span>); |
This file contains 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
// string to convert to hashtag | |
var string = "This is a Long Title to Convert to a Hashtag"; | |
// common words we want to filter out that make for a bad hashtag | |
// source: http://en.wikipedia.org/wiki/Most_common_words_in_English | |
var common = [ | |
'to','of','in','for','on','with','at','by','from','up','about','into','beneath','the', | |
'and','a','that','I','it','not','he','as','you','this','but','his','they','her','she','or', | |
'an','will','my','one','all','would','there','their','vs' | |
]; |