Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lmfresneda/hashtagfy
Convert any text to #hashtag
https://github.com/lmfresneda/hashtagfy
hashtag hashtags tag tags twitter
Last synced: 6 days ago
JSON representation
Convert any text to #hashtag
- Host: GitHub
- URL: https://github.com/lmfresneda/hashtagfy
- Owner: lmfresneda
- License: mit
- Created: 2017-08-06T19:32:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T20:03:24.000Z (over 7 years ago)
- Last Synced: 2024-12-14T15:39:27.098Z (21 days ago)
- Topics: hashtag, hashtags, tag, tags, twitter
- Language: JavaScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hashtagfy
[![npm](https://img.shields.io/npm/v/hashtagfy.svg?style=flat-square)](https://www.npmjs.com/package/hashtagfy) ![Love](https://img.shields.io/badge/love-max-brightgreen.svg?style=flat-square) [![Travis](https://img.shields.io/travis/lmfresneda/hashtagfy.svg?style=flat-square)](https://travis-ci.org/lmfresneda/hashtagfy)Convert any text to #hashtag
## How to use
```javascript
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](https://github.com/lmfresneda)