export interface PrefixOptions { /**
     * Emoji which is used as prefix when true.
     *
     * Defaults to ✅
     */ readonly prefixTrue ? : string ; /**
     * Emoji which is used as prefix when false.
     *
     * Defaults to 🚫
     */ readonly prefixFalse ? : string ; /**
     * Do not show the prefix when true.
     */ readonly hideTrueEmoji ? : boolean ; /**
     * Do not show the prefix when false.
     */ readonly hideFalseEmoji ? : boolean ; } export const emojiTrue = '✅' ; export const emojiFalse = '🚫' ; param text param prefix param options export function prefixEmoji ( text , prefix , options = { } ) { const internalOptions = { ... options , prefixTrue : options . prefixTrue ?? emojiTrue , prefixFalse : options . prefixFalse ?? emojiFalse , } ; const prefixContent = applyOptionsToPrefix ( prefix , internalOptions ) ; return prefixText ( text , prefixContent ) ; } function applyOptionsToPrefix ( prefix , options ) { const { prefixFalse , prefixTrue , hideFalseEmoji , hideTrueEmoji , } = options ; if ( prefix === true ) { if ( hideTrueEmoji ) { return undefined ; } return prefixTrue ; } if ( prefix === false ) { if ( hideFalseEmoji ) { return undefined ; } return prefixFalse ; } return prefix ; } param text param prefix export function prefixText ( text , prefix ) { if ( ! prefix ) { return text ; } return `${ prefix } ${ text }` ; }