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

@enadhq/enad-ts-sdk

v0.16.9

Published

A TypeScript SDK for interacting with the **Enad API**. Provides a clean, type-safe interface with all responses standardized to `[data, error]`.

Downloads

1,160

Readme

Enad SDK

A TypeScript SDK for interacting with the Enad API.
Provides a clean, type-safe interface with all responses standardized to [data, error].


Installation

pnpm add @enadhq/enad-ts-sdk
# or
npm install @enadhq/enad-ts-sdk
# or
yarn add @enadhq/enad-ts-sdk
import { ShopperClient } from "@enadhq/enad-ts-sdk";

// Minimum configuration
export const client = new ShopperClient({
  apiKey: "api-key-123",
  appId: "app-id-UUID",
  groupId: "store-group-slug",
});

Usage

  1. Fetch a single product by SKU
const [product, error] = await client.products.getBySku("SKU123");

if (error) {
  console.error("Failed to fetch product:", error.message);
} else {
  console.log("Product id:", product.id);
}
  1. Fetch multiple products by SKUs
const [skus, error] = await client.products.getBySkus(["SKU123", "SKU456"]);

if (error) {
  console.error("Failed to fetch products:", error.message);
} else {
  console.log("skus:", skus);
}
  1. Search products
const [result, error] = await client.products.search("laptop", { page: 1, per_page: 5 });

if (error) {
  console.error("Search failed:", error.message);
} else {
  console.log("Search results:", result);
}

Response Format

All SDK methods return a standardized tuple-style response, making it simple and predictable to handle results:

type ApiResponse<T> = [data: T, error: null] | [data: null, error: ApiError];

This design allows for easy destructuring and explicit naming, for example:

const [tags, error] = await client.tags.getAll();

if (error) {
  console.error("Failed to fetch tags:", error.message);
  return;
}

console.log("Tags:", tags);

Because of the response contract:

  • data is guaranteed to be defined if error is null.
  • error is guaranteed to be defined if data is null.

This means you can safely use one or the other without additional null checks, and you don’t need try/catch blocks for simple error handling.