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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@iocium/rdap-lite

v1.0.1

Published

Lightweight RDAP client with normalized output, caching, CLI, and browser compatibility.

Downloads

9

Readme

@iocium/rdap-lite

npm version License: MIT

Lightweight RDAP client for domain and IP lookups with normalized JSON output, built-in caching, and a user-friendly CLI. Works seamlessly in Node.js, browsers, and serverless environments.

🚀 Blazingly fast lookups powered by automatic IANA bootstrap discovery and retry logic.

🔗 Explore full API docs at: https://iocium.github.io/rdap-lite

📌 Features

  • 🔍 Normalized Results: Consistent JSON shape for domain & IP RDAP responses
  • 🌐 IANA Bootstrap: Automatic discovery of RDAP endpoints (no manual URLs)
  • ⏱️ Retries & Backoff: Automatic retry on HTTP 429 with exponential backoff
  • ⚙️ Flexible Configuration: Custom headers, proxy support, timeouts, and cache
  • 💾 Pluggable Caching: Default in-memory cache or custom implementations
  • 🛠 Dual Interface: Promise-based API and standalone CLI

📦 Installation

npm install @iocium/rdap-lite
# or
yarn add @iocium/rdap-lite

⚡️ CLI Usage

# Simple lookup
npx rdap-lite example.com

# JSON output
npx rdap-lite 8.8.8.8 --json

For more options:

rdap-lite --help

💻 Programmatic API

import { queryRDAP } from '@iocium/rdap-lite';

(async () => {
  try {
    const info = await queryRDAP('example.com', {
      timeout: 5000,
      headers: { 'User-Agent': 'my-app/1.0' },
      proxy: 'https://myproxy.local/',
    });
    console.log(info);
  } catch (err) {
    console.error('Error:', err);
  }
})();

Configuration Options

| Option | Type | Default | Description | |------------|---------------------------|--------------|-------------------------------------------| | headers | Record<string,string> | {…} | Custom HTTP headers | | proxy | string | undefined | Proxy prefix URL for routing requests | | timeout | number | 10000 | Request timeout in milliseconds | | cache | RDAPCache | In-memory | Custom cache implementing .get() / .set() |

The default in-memory cache retains results for 1 hour.

Cache Backends

You can use the default in-memory cache via the cache option (using memoryCache), or Workers KV and D1 backends with the built-in helpers:

import { queryRDAP, kvCache, d1Cache } from '@iocium/rdap-lite';

// Use KV namespace as cache
const result = await queryRDAP('example.com', {
  cache: kvCache(env.MY_KV_NAMESPACE),
});

// Use D1 database as cache
const result2 = await queryRDAP('example.com', {
  cache: d1Cache(env.DB),
});

🌍 Environment Compatibility

  • Node.js (v14+)
  • Browsers (bundlers supporting Fetch & AbortController)
  • Cloudflare Workers & other serverless platforms

🖥️ Browser Build

We provide a standalone IIFE bundle for direct use in browsers (no bundler required):

<script src="dist/browser/index.global.js"></script>
<script>
  rdapLite.queryRDAP('example.com').then(console.log);
</script>

📚 Documentation

Explore the full API reference generated via TypeDoc:

▶️ View Documentation

📄 License

MIT