npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tuseme-sdk

v1.0.0

Published

Official Node.js SDK for the Tuseme SMS API

Readme

Tuseme Node.js SDK

Official Node.js client for the Tuseme SMS API.

npm version Node 14+ License: MIT

Installation

npm install tuseme-sdk

Quick Start

const { TusemeClient } = require('tuseme-sdk');

const client = new TusemeClient({
  apiKey: 'tk_test_your_api_key',
  apiSecret: 'sk_test_your_api_secret',
});

// Send an SMS
const response = await client.messages.send({
  content: 'Hello from Tuseme! Your OTP is 482910.',
  sender_id: 'TUSEME-LTD',
  recipients: [{ msisdn: '+254712345678', name: 'John Doe' }],
  type: 'transactional',
  priority: 'HIGH',
});

console.log('Message ID:', response.message_id);

Features

  • Zero dependencies — uses built-in http/https modules
  • TypeScript definitions included
  • Automatic authentication — tokens are obtained and refreshed automatically
  • Built-in retries — exponential backoff for transient failures
  • Node.js 14+ compatible

Usage

Send SMS

// Single recipient
const response = await client.messages.send({
  content: 'Your verification code is 123456',
  sender_id: 'TUSEME-LTD',
  recipients: [{ msisdn: '+254712345678' }],
  type: 'transactional',
});

// Multiple recipients with metadata
const response = await client.messages.send({
  content: 'Flash sale! 50% off today only.',
  sender_id: 'TUSEME-LTD',
  recipients: [
    { msisdn: '+254712345678', name: 'Alice' },
    { msisdn: '+254798765432', name: 'Bob' },
  ],
  type: 'promotional',
  metadata: { campaign: 'flash_sale_q2' },
});

Check Delivery Status

const status = await client.messages.get('msg_a1b2c3d4...');
console.log(status.status); // "delivered"

List Messages

const result = await client.messages.list({ page: 1, page_size: 20 });
result.data.forEach((msg) => console.log(msg.recipient, msg.status));

Error Handling

const { TusemeClient, AuthenticationError, ValidationError } = require('tuseme-sdk');

try {
  await client.messages.send({ content: 'Hello!', recipients: [...] });
} catch (err) {
  if (err instanceof AuthenticationError) {
    console.error('Invalid credentials');
  } else if (err instanceof ValidationError) {
    console.error('Bad request:', err.message);
  }
}

License

MIT — see LICENSE.