Skip to content

lmfresneda/hashtagfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hashtagfy

npm Love Travis

Convert any text to #hashtag

How to use

const hashtagfy = require('hashtagfy')

const hashtag1 = hashtagfy('Any text');
// hashtag1 == '#AnyText'

const hashtag2 = hashtagfy('Similar-text_more');
// hashtag2 == '#SimilarTextMore'

const hashtag3 = hashtagfy('And the last', { capitalize: false });
// hashtag3 == '#andthelast'

NOTE: The capitalize option is optional. Is true by default.

Run test

$ npm install && npm test

License

MIT © lmfresneda