wa-me-generator
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

wa-me-generator

A simple module to create wa.me links

A wa.me link is used to open a WhatsApp Chat with a person using their phone number.

Usage

Install the package: npm install wa-me-generator

const waMe = require("wa-me-generator");

// Create a link from a phone number:
waMe.createFromNumber("+56 (1356) 12345-67");
// returns: "https://wa.me/5613561234567"

// Create a link from a phone number with predefined country code:
waMe.createFromNumber("1356 12345-67", "56");
// returns: "https://wa.me/5613561234567"

// Create a link from a phone number with a pre-filled message:
waMe.createFromNumberWithMessage("+49 (30) 82-56/123 99", "message"); // predefined country code works here aswell
// returns: "https://api.whatsapp.com/send/?phone=4930825612399&text=message"

Readme

Keywords

Package Sidebar

Install

npm i wa-me-generator

Weekly Downloads

2

Version

1.2.1

License

MIT

Unpacked Size

5.6 kB

Total Files

7

Last publish

Collaborators

  • dmho