Detalhes do pacote

convert-gitmoji

Intevel146.2kMIT0.1.5

♻️ Convert strings to gitmojis

readme (leia-me)

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

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

v0.1.5

🩹 Fixes

  • Type exports (4d1eb4a)

❤️ Contributors

  • Conner Bachmann

v0.1.4

🩹 Fixes

  • Export gitmojis (1c23ab3)

🏡 Chore

  • Add repository to package.json (137dd6f)
  • Fix typo (17d0480)

❤️ Contributors

  • Conner Bachmann
  • Wilson Pinto

v0.1.3

🚀 Enhancements

  • Switched to changelogen (354c77f)
  • emojis: Added 🧵 & 🦺 (f7517e5)

🩹 Fixes

  • chore: Updated description (cddb0f8)
  • chore: Removed lock file (a4745e7)

❤️ Contributors

  • Conner
  • Conner Bachmann

0.1.2 (2022-07-05)

Bug Fixes

  • chore: added types option to package.json (a46ddff)

0.1.1 (2022-07-05)

Features

  • chore: fixed version (bcd8fd9)
  • chore: v0.1.0 (cc435d7)
  • chore: v1.0.0 (70bebdc)
  • convert: :sparkles: Added whitespace options (47d7d61)
  • convert: Added whitespace options (a403a3f), closes #4

Bug Fixes

  • chore: bumped version (07a9c93)
  • chore: removed yarn error log (418a0da)

0.9.10 (2022-06-27)

Features

Bug Fixes

  • ci: updated node version (f9126ff)

1.0.1 (2022-06-27)

Bug Fixes

  • ci: updated node version (f9126ff)

0.0.3 (2022-06-27)

Features

  • chore: added test/code example :memo: (93732e7)
  • chore: improved performance using regex (d7a5abb)
  • chore: migrated to unbuild@0.7.4 (fef82d5)

Bug Fixes

  • chore: optimized build settings (e767622)

0.0.2 (2022-06-26)

Features

  • chore: added data for first gitmojis (4b874ed)
  • chore: added withSpace option to convert (977f477)
  • chore: completed gitmoji list (7752c83)
  • chore: created readme (c3484b8)
  • chore: integrated core functionality (96e190a)
  • deps: updated dependencies & tsconfig (6053187)

Bug Fixes

  • ci: deactivate lint workflow (944a61f)