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

@neabyte/fetch

v1.3.5

Published

HTTP client with timeout, retries, streaming, downloads, and error handling for browser and Node.js.

Readme

✨ Features

  • 🌐 Universal Support - Browser and Node.js
  • 🔐 Authentication - Basic, Bearer, and API key authentication
  • 🔒 SSL Pinning - Certificate validation with SHA-256 pinning
  • 🍪 Cookie Management - Automatic cookie handling for browser and Node.js
  • Request Cancellation - AbortSignal support
  • ⏱️ Timeout Control - Configurable timeouts (default: 30s)
  • 🔄 Retry Logic - Exponential backoff with Retry-After header support
  • 📡 NDJSON Streaming - Real-time JSON processing
  • 📊 Progress Tracking - Upload and download progress
  • 🚦 Rate Limiting - Control transfer speeds with maxRate option
  • 📦 Request Bodies - JSON, FormData, URLSearchParams, binary data
  • 📥 File Downloads - Cross-platform file downloads
  • ⚖️ Request Balancer - Load balance requests across multiple endpoints
  • 📨 Response Forwarder - Forward responses to multiple endpoints
  • 🛡️ Error Handling - Detailed error information with status codes

📦 Installation

NPM

npm install @neabyte/fetch

CDN (Browser)

<!-- ES Modules (Recommended) -->
<script type="module">
  import fetch from 'https://cdn.jsdelivr.net/npm/@neabyte/fetch/+esm'
  // or
  import fetch from 'https://esm.sh/@neabyte/fetch'
  // or
  import fetch from 'https://esm.run/@neabyte/fetch'

  // Use fetch as normal
  const data = await fetch.get('https://api.example.com/data')
</script>

<!-- UMD (Global Variable) -->
<script src="https://unpkg.com/@neabyte/fetch@latest/dist/index.umd.min.js"></script>
<script>
  // Available as global variable 'Fetch' with default export
  const FetchClient = window.Fetch.default
  const data = await FetchClient.get('https://api.example.com/data')
</script>

📖 Quick Start

import fetch, { FetchError } from '@neabyte/fetch'

// Simple GET request
const users = await fetch.get('https://jsonplaceholder.typicode.com/users')

// POST with JSON body
const newPost = await fetch.post('https://jsonplaceholder.typicode.com/posts', {
  title: 'My New Post',
  body: 'This is the content',
  userId: 1
})

// Error handling
try {
  const data = await fetch.get('https://api.example.com/data')
} catch (error) {
  if (error instanceof FetchError) {
    console.log('HTTP Error:', error.status, error.message)
  }
}

// Rate limiting for downloads (100KB/s)
const file = await fetch.get('https://example.com/large-file.zip', {
  download: true,
  filename: 'large-file.zip',
  maxRate: 100 * 1024, // 100KB/s
  onProgress: (percentage) => console.log(`Download: ${percentage}%`)
})

// Rate limiting for uploads (50KB/s)
const result = await fetch.post('https://api.example.com/upload', fileData, {
  maxRate: 50 * 1024, // 50KB/s
  onProgress: (percentage) => console.log(`Upload: ${percentage}%`)
})

// Cookie management (automatic in browser, manual in Node.js)
const response = await fetch.get('https://api.example.com/data', {
  withCookies: true // Enables cookie handling
})

For detailed examples and usage patterns, see the documentation.


🗺️ Roadmap

🔮 Planned Features

  • [ ] HTTP Proxy Support - HTTP proxy connections
  • [ ] Proxy Authentication - Username/password for proxies
  • [ ] Request/Response Interceptors - Request and response modification
  • [ ] Request/Response Transformers - Data transformation
  • [ ] SOCKS Proxy Support - SOCKS4/SOCKS5 proxy connections

📋 Future Considerations

  • [ ] Additional proxy types and configurations
  • [ ] Enhanced proxy error handling
  • [ ] Proxy connection pooling

📄 License

This project is licensed under the Apache License 2.0. See the LICENSE file for more info.