Module text
Text Basic Functions
Text Case Functions
Text Emoji Functions
Text Fit Functions
Text Basic Functions
textBasicMask
- textBasicMask(text: string, mask?: string, showFirst?: number, showLast?: number): string
-
Parameters
-
text: string
-
mask: string = "*"
-
showFirst: number = 1
-
Optional showLast: number
Returns string
textBasicPlain
- textBasicPlain(text: string): string
-
Parameters
Returns string
Text.
textBasicSlugify
- textBasicSlugify(text: string): string
-
Parameters
Returns string
Slug text.
textFromNumber
- textFromNumber(numberToWords: number): string
-
Parameters
Returns string
Text Case Functions
textCaseAbbreviate
- textCaseAbbreviate(text: string, abbrLettersCount?: number): string
-
Parameters
-
text: string
-
abbrLettersCount: number = 1
Returns string
textCaseCamel
- textCaseCamel(text: string, firstCapital?: boolean): string
-
Parameters
-
text: string
-
firstCapital: boolean = false
Returns string
textCaseCapitalize
- textCaseCapitalize(text: string): string
-
Parameters
Returns string
Capitalized first letter
textCaseKebab
- textCaseKebab(text: string): string
-
Parameters
Returns string
textCaseLower
- textCaseLower(text: string): string
-
Parameters
Returns string
Lower-case text
textCaseScreamingSnake
- textCaseScreamingSnake(text: string): string
-
Parameters
Returns string
textCaseSnake
- textCaseSnake(text: string): string
-
Parameters
Returns string
textCaseTitle
- textCaseTitle(text: string): string
-
Parameters
Returns string
textCaseTrain
- textCaseTrain(text: string): string
-
Parameters
Returns string
Train-case text
textCaseUpper
- textCaseUpper(text: string): string
-
Parameters
Returns string
Uppercase text
Text Emoji Functions
textEmojiJoin
- textEmojiJoin(emoji: string, ...emojis: string[]): string
-
Parameters
-
emoji: string
-
Rest ...emojis: string[]
Returns string
Joined emoji.
Text Fit Functions
textFitLength
- textFitLength(text: string, length?: number, addEllipsis?: boolean): string
-
Parameters
-
text: string
-
length: number = 99
-
addEllipsis: boolean = true
Returns string
New text.
textBasicMask
Function for masking the character.
import { textBasicMask } from "@corefunc/corefunc/text/basic/mask";
0.3.55