mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 08:36:26 +00:00
16 lines
429 B
TypeScript
16 lines
429 B
TypeScript
import emoji from 'node-emoji';
|
|
import type { RenovateConfig } from '../config/types';
|
|
|
|
let unicodeEmoji = true;
|
|
|
|
export function setEmojiConfig(_config: RenovateConfig): void {
|
|
unicodeEmoji = _config.unicodeEmoji;
|
|
}
|
|
|
|
export function emojify(text: string): string {
|
|
return unicodeEmoji ? emoji.emojify(text) : text;
|
|
}
|
|
|
|
export function unemojify(text: string): string {
|
|
return unicodeEmoji ? text : emoji.unemojify(text);
|
|
}
|