JSPM

hashtagalong

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q27581F
  • License ISC

Library of hashtag helpers

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

git clone https://github.com/remino/hashtagalong
cd hashtagalong
nvm use # If you have nvm installed
npm instal

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

Tests

npm test

Licence

See LICENSE.txt.