pub fn emoji_for(kind: &str) -> Option<&'static str>Expand description
The emoji the helpers4 commit convention puts after the colon for a commit type, such as ✨
for feat and 🐛 for fix.
The type is matched ignoring case. These are the primary emoji of the convention (see
commit-convention.json in the .dev repository), one per standard type: feat, fix,
docs, refactor, test, chore, perf, style, ci, build and revert.
§Arguments
kind- The commit type, such as"feat".
§Returns
The emoji, or None for a type the convention does not define.
§Examples
use helpers4::commit::emoji_for;
assert_eq!(emoji_for("feat"), Some("\u{2728}"));
assert_eq!(emoji_for("FIX"), Some("\u{1f41b}"));
assert_eq!(emoji_for("wip"), None);