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

@kazuni/sdk

v0.5.2

Published

Official JavaScript/TypeScript SDK for the Kazuni notifications API

Readme

@kazuni/sdk

Kazuni is a unified notifications platform for African businesses - email today, with SMS and WhatsApp planned. This is the official JavaScript/TypeScript SDK for the Kazuni API.

Install

pnpm add @kazuni/sdk
npm i @kazuni/sdk
# or
yarn add @kazuni/sdk

Quickstart

import { Kazuni } from "@kazuni/sdk";

const kazuni = new Kazuni(process.env.KAZUNI_API_KEY!);

const result = await kazuni.send.email({
  from: "Acme <[email protected]>",
  to: "[email protected]",
  subject: "Welcome to Acme",
  html: "<p>Thanks for signing up.</p>",
  text: "Thanks for signing up.",
});

console.log(result.id, result.status); // "email_...", "queued"

from must be on a domain you have verified with Kazuni. to is a single recipient address per request.

Configuration

new Kazuni(apiKey) is shorthand for new Kazuni({ apiKey }). The full options object:

const kazuni = new Kazuni({
  apiKey: process.env.KAZUNI_API_KEY!,
  baseUrl: "https://api.usekazuni.com", // override for self-hosting or tests
  timeout: 30_000, // per-request timeout in milliseconds
  maxRetries: 2, // retries on 429 and 5xx responses
});
  • baseUrl: defaults to the production Kazuni API. Override it when testing against a local API server or a self-hosted deployment.
  • timeout: aborts a request that takes longer than this, in milliseconds.
  • maxRetries: on 429 and 5xx responses, the SDK retries with exponential backoff and jitter, honoring the Retry-After header when the API sends one. GET requests are always retry-eligible. POST requests (like send.email) are only retried when you pass an idempotencyKey, so a retried send can never silently double-send:
await kazuni.send.email(
  { from: "[email protected]", to: "[email protected]", subject: "Hi", html: "<p>Hi</p>" },
  { idempotencyKey: "welcome-email-user-42" }
);

Errors

Request failures (authentication, validation, network, or API errors) throw a KazuniError:

import { Kazuni, KazuniError } from "@kazuni/sdk";

try {
  await kazuni.send.email({ from: "[email protected]", to: "bad", subject: "Hi", html: "<p>Hi</p>" });
} catch (error) {
  if (error instanceof KazuniError) {
    console.error(error.message, error.status, error.code, error.requestId);
  }
}
  • error.status - the HTTP status code, when the failure came from an API response.
  • error.code - a machine-readable error code, when the API provides one.
  • error.requestId - a request identifier for support, when the API returns one.

API reference

Every exported symbol carries JSDoc, so your editor's hover/autocomplete is the fastest reference. For a browsable Markdown API reference generated from that same JSDoc, run:

pnpm docs

This writes the reference to docs/api/ (gitignored - generate it locally rather than reading a possibly-stale copy).

Status

This SDK is alpha and tracks Kazuni API v1. The v1 surface currently covers sending transactional email; SMS, WhatsApp, and other resources will land here as the underlying API supports them. Expect breaking changes before a 1.0 release.

Contributing

See CONTRIBUTING.md.

License

MIT