JSPM

hashtagfy2

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25365F
  • License MIT

Convert any text to #hashtag

Package Exports

  • hashtagfy2

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 (hashtagfy2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hashtagfy2

Convert any text to #hashtag. This fork of hashtagfy replace string template with string concatenation.

Installation

npm install --save hashtagfy2

How to use

const hashtagfy = require('hashtagfy2')

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.