Fix linting and formatting issues
This commit is contained in:
parent
44aa9c0ccc
commit
ecc46c0934
@ -9,7 +9,10 @@ const WHATSAPP_GROUP_SUFFIX = "@g.us";
|
|||||||
*/
|
*/
|
||||||
function stripWhatsAppTargetPrefixes(value: string): string {
|
function stripWhatsAppTargetPrefixes(value: string): string {
|
||||||
// More efficient than a loop: matches "whatsapp:" followed by optional spaces, one or more times.
|
// More efficient than a loop: matches "whatsapp:" followed by optional spaces, one or more times.
|
||||||
return value.trim().replace(/^(whatsapp:\s*)+/i, "").trim();
|
return value
|
||||||
|
.trim()
|
||||||
|
.replace(/^(whatsapp:\s*)+/i, "")
|
||||||
|
.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isWhatsAppGroupJid(value: string): boolean {
|
export function isWhatsAppGroupJid(value: string): boolean {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user