Package Exports
- hashtagalong
- hashtagalong/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hashtagalong) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
hashtagalong
Library of hashtag helpers
by Remino Rem https://remino.net/
Installation
npm add hashtagalong
Usage
API
import { extract, format } from 'hashtagalong'
// Each return: ['#a', '#c']
extract('#a b #c')
extract(['#a', ['b', '#c']])
// Each return: 'a #b c'
format('a #b c')
format(['#a', ['b', '#c']])
CLI
USAGE: hashtagalong [<options>] [...<string>]
Extract hashtags from a string or format keywords into hashtags.
String may be specified as arguments or pipe from standard input.
OPTIONS:
-e --extract Extract hashtags from input.
-f --format Format keywords into hashtags.
-h --help Show this help screen.
Examples
# Each output: #a #c
./hashtagalong -e \#a b \#c
echo '#a b #c' | ./hashtagalong -f
# Each output: #a #c
./hashtagalong -f a b c
echo a b c | ./hashtagalong -f
Contributing
If you with to contribute to this module, clone this repo, start a new branch, then submit a pull request:
git clone https://github.com/remino/hashtagalong
cd hashtagalong
nvm use # If you have nvm installed
npm install
Tests
npm test
Licence
See LICENSE.txt.