0.0.2 β€’ Published 1 year ago

@nyxb/convert-conmitmoji v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Easily Transform Conmitmoji! πŸš€

Want to effortlessly convert Commitmojis in your texts? Look no further! Introducing the convert-commitmoji package, which makes the conversion process a breeze. Just follow these simple installation and usage instructions.

Installation πŸ”§

Choose your preferred package manager:

pnpm:

pnpm add @nyxb/convert-conmitmoji

npm:

npm install @nyxb/convert-conmitmoji

yarn:

yarn add @nyxb/convert-conmitmoji

or use easily always the right package manager with @nyxb/nyxi

Usage πŸ“š

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

Convert all commitmojis in a string. The withSpace parameter is set to false by default. If set to true, a trailing whitespace will be added after the converted commitmoji.

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 surround the string with whitespaces.

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

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

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 πŸ”₯ !"

Now you're ready to add some flair to your text with Commitmoji conversions! πŸŽ‰

License

MIT