📝StringEx
The module provides several methods for manipulating strings.
Imports
Method of Use
To use this module, you need to inject it into the desired service.
Injecting the module into our service.
Without dependencies
You won't need to connect the pieces with any other module.
Methods
LZStringCompressToEncodedURIComponent
public
Compresses a string to EncodedURIComponent.
LZStringDecompressFromEncodedURIComponent
public
Decompresses a string from EncodedURIComponent to string.
compress
public
Compresses a {string | Uint8Array | Buffer} to base64.
decompress
public
Decompresses a string from base64 to {Type | string | Uint8Array | Buffer}.
hashPassword
public
Return hash from password.
compareHashPassword
public
Compare hash from password.
hash
public
Return hash from string.
bytesToString
public
Return bytes to string.
getFilename
public
Get name of file.
getFileExtension
public
Get extension of file.
extractNumbers
public
Extract numbers from string.
maskMoney
public
Convert a string to money format.
maskPhone
public
Convert a string to phone pretty.
maskZipCode
public
Convert a string to zip code pretty.
maskCNPJ
public
Convert a string to CNPJ pretty.
maskCPF
public
Convert a string to CPF pretty.
maskRG
public
Convert a string to RG pretty.
Last updated