contact-ts
v1.0.3
Published
A web typescript library for social media contact
Downloads
7
Readme
contact-ts
A TypeScript utility for sharing messages and sending WhatsApp chats, with full test coverage.
Features
- shareToWhatsAppp: Share a message via WhatsApp (mobile or web).
- sendWhatsapp: Send a WhatsApp message to a specific contact (mobile or web).
- Mobile/desktop detection.
- Fully tested with Jest and jsdom.
Usage
Installation
pnpm installFunctions
shareToWhatsAppp
import { shareToWhatsAppp } from "contact-ts";
shareToWhatsAppp("Hello world!");sendWhatsapp
import { sendWhatsapp } from "contact-ts";
sendWhatsapp(1234567890, "Hello, contact!");Testing
Run all tests:
pnpm testDevelopment
- Written in TypeScript.
- Tests located in
/test. - Uses Jest with jsdom for browser-like environment.
