convert-gitmoji
♻️ Convert strings to gitmojis
Last updated 3 years ago by intevel .
MIT · Original npm · Tarball · package.json
$ cnpm install convert-gitmoji 
SYNC missed versions from official npm registry.

convert-gitmoji

npm version npm downloads Github Actions CI License

Simple way to replace strings with gitmojis ♻️

Install


# Using npm
npm install convert-gitmoji

# Using yarn
yarn add convert-gitmoji

Usage

convert(content: string, withSpace?: boolean | "leading" | "trailing" | "both")

Convert all gitmojis in a string withSpace is default false, if true its sets a trailing (at the end of the string) whitespace after the converted gitmoji.

For more control, withSpace can also be set to leading for a whitespace before the string, trailing for a whitespace at the end of the string (same as true) or both to have the string surrounded by whitespaces.

// CommonJS
const { convert } = require("convert-gitmoji");

// ESM
import { convert } from "convert-gitmoji";

convert(':arrow_up: bump qs from 6.10.3 to 6.10.4 (xxx) - **helper:** :pencil:  Updated TSDoc (xxx)', true);

--> "⬆️ bump qs from 6.10.3 to 6.10.4 (xxx) - **helper:** ✏️ Updated TSDoc (xxx)"

convert("This:art:is on:fire:!")

--> "This????is on????!"

convert("This:art:is on:fire:!", "both")

--> "This ???? is on ???? !"

License

Published under MIT - Made with ❤️ by Conner Luka Bachmann

Current Tags

  • 0.1.3                                ...           latest (3 years ago)

7 Versions

  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (8)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |