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

dummy-ts-sdk

v1.1.2

Published

A TypeScript SDK for interacting with the Dummy API. This package provides a simple and type-safe interface for working with the API in Node.js or browser environments.

Downloads

8

Readme

Dummy TypeScript SDK

A TypeScript SDK for interacting with the Dummy API. This package provides a simple and type-safe interface for working with the API in Node.js or browser environments.

Features

  • Written in TypeScript with full type declarations
  • Compatible with both CommonJS and ES Modules
  • Includes UMD build for browser environments
  • Easily extendable to add more API endpoints

Installation

Install the SDK via npm:

npm install dummy-ts-sdk

Usage

CommonJS

const { Library } = require("dummy-ts-sdk");

const sdk = new Library({
  apiKey: "your-api-key",
  baseUrl: "https://api.example.com",
});

sdk.posts.getPosts().then((posts) => console.log(posts));

ES Modules

import { Library } from "dummy-ts-sdk";

const sdk = new Library({
  apiKey: "your-api-key",
  baseUrl: "https://api.example.com",
});

sdk.posts.getPosts().then((posts) => console.log(posts));

Browser (via unpkg)

<script src="https://unpkg.com/[email protected]"></script>
<script>
  const sdk = new dummyTsSdk.Library({
    apiKey: "your-api-key",
    baseUrl: "https://api.example.com",
  });

  sdk.posts.getPosts().then((posts) => console.log(posts));
</script>

SDK Documentation

Library

The Library class is the main entry point for interacting with the Dummy API. It provides access to the following services:

  • posts: Methods for working with post-related endpoints
  • users: Methods for working with user-related endpoints

Example

const sdk = new Library({
  apiKey: "your-api-key",
  baseUrl: "https://api.example.com",
});

// Get a list of posts
sdk.posts.getPosts().then((posts) => console.log(posts));

Configuration

To configure the SDK for your project, you can modify the tsconfig.json file or use the defaults. Here's a basic setup:

{
  "compilerOptions": {
    "target": "ES2017",
    "module": "ESNext",
    "outDir": "./dist"
  }
}

For more detailed configuration options and their explanations, see the full TypeScript Configuration Documentation.

TypeScript Configuration Documentation

Compiler Options

| Option | Value | Description | | ---------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | target | "ES2017" | Specifies the ECMAScript target version. ES2017 provides a balance between modern features and compatibility. | | module | "ESNext" | Specifies the module code generation. ESNext allows bundlers like Rollup or Webpack to decide which module system to use. | | moduleResolution | "node" | Defines how TypeScript resolves modules. node is used for Node.js-style module resolution. | | lib | ["ES2017", "DOM"] | Specifies the libraries to be included in the compilation. ES2017 includes modern JavaScript features, and DOM provides support for browser APIs. | | declaration | true | Generates corresponding .d.ts (declaration) files for your TypeScript code, making your SDK usable with TypeScript consumers. | | declarationMap | true | Generates .d.ts.map files to allow consumers to debug TypeScript files. Optional, can increase package size. | | removeComments | true | Removes comments from the compiled output to reduce file size. | | allowSyntheticDefaultImports | true | Allows default imports from modules that don’t have a default export, improving compatibility with non-ES modules. | | esModuleInterop | true | Ensures compatibility between CommonJS and ES Modules by enabling default imports from CommonJS modules. | | skipLibCheck | true | Skips type-checking for library files to improve build performance. Recommended for speeding up builds. | | sourceMap | false | Disables generation of source maps for the JavaScript output, keeping the package lightweight. | | outDir | "./dist" | Specifies the directory where the compiled JavaScript files are output. | | baseUrl | "./" | Sets the base URL for resolving non-relative module imports. | | strict | true | Enables strict type-checking options, which help catch potential errors early and enforce best practices. | | incremental | true | Enables incremental builds for faster recompilation during development. |

Include and Exclude Patterns

| Option | Value | Description | | ------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | include | ["src/**/*"] | Specifies the files to include in the compilation. Here, all files under the src directory are included. | | exclude | ["node_modules", "dist", "test", "lib", "**/*spec.ts"] | Excludes directories and files that should not be part of the build. This includes test files, node modules, and output folders. |