1.0.1 • Published 3 years ago
wa-me-link-generator v1.0.1
wa.me-link-generator
Generate WhatsApp Chat ( wa.me ) Links!
🧑💻 Installation
npm i wa-me-link-generator
How to use? 🧐
const wa_me = require('wa-me-link-generator')
// Generates WhatsApp Chat Link From Number:
wa_me.fromNumber('+91 99433 33333');
// returns https://wa.me/919943333333
// Generates WhatsApp Chat Link From Number With Text Message:
wa_me.fromNumberWithText('+91 99433 33333', 'Hey! How are you? 😘');
// returns https://api.whatsapp.com/send/?phone=919943333333&text=Hey!%20How%20are%20you?%20%F0%9F%98%98
// Generates link to Forward message:
wa_me.forwardText('I am fine! ❤️');
// returns https://api.whatsapp.com/send/?text=I%20am%20Fine%20%E2%9D%A4%EF%B8%8F
/* Generates link to Forward message to a particular chat
( This does the same action, which fromNumberWithText do. ) */
wa_me.forwardTextToChat('+91 99433 33333', 'Okay 😁');
// returns https://api.whatsapp.com/send/?phone=919943333333&text=Okay%20%F0%9F%98%81
// returns same which fromNumberWithText function returns