Spaces:
Paused
Paused
Download src/common/utils.ts from Rasyiq03/scheffin-api: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/spaces/Rasyiq03/scheffin-api/resolve/main/src/common/utils.ts
- Command line
-
hf download hf://spaces/Rasyiq03/scheffin-api/src/common/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/Rasyiq03/scheffin-api/resolve/main/src/common/utils.ts
354 Bytes
| export function formatJid(target: string): string { | |
| if (target.includes('@g.us') || target.includes('@s.whatsapp.net')) { | |
| return target; | |
| } | |
| const cleanTarget = target.replace(/\D/g, ''); | |
| let processed = cleanTarget; | |
| if (processed.startsWith('0')) { | |
| processed = '62' + processed.slice(1); | |
| } | |
| return processed + '@s.whatsapp.net'; | |
| } | |