@nyxb/convert-conmitmoji v0.0.2
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
1 year ago