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

specters

v2.0.0

Published

Node.js bindings for Specter HTTP client with TLS/HTTP2/HTTP3 fingerprint control

Readme

Specter Node.js Bindings

Node.js bindings for Specter, a high-performance HTTP client with full TLS, HTTP/2, and HTTP/3 fingerprint control.

Features

  • Native async/await: Promise-based API with native performance
  • Browser fingerprinting: Impersonate Chrome, Firefox, or use custom TLS/HTTP2 settings
  • HTTP/3 support: Automatic upgrade via Alt-Svc headers
  • Connection pooling: HTTP/2 multiplexing and HTTP/1.1 keep-alive
  • Timeout control: Granular timeouts for connect, TTFB, read/write idle, and total request time
  • Automatic decompression: gzip, deflate, brotli, zstd

Installation

npm install @specter/client

Quick Start

const { Client } = require('@specter/client');

async function main() {
  // Create a client with default settings
  const client = Client.builder().build();
  
  // Make a GET request
  const response = await client.get('https://httpbin.org/get').send();
  console.log(`Status: ${response.status}`);
  console.log(await response.text());
}

main();

Browser Impersonation

const { Client, FingerprintProfile } = require('@specter/client');

// Impersonate Chrome 142
const client = Client.builder()
  .fingerprint(FingerprintProfile.Chrome142)
  .build();

// Or Firefox 133
const client = Client.builder()
  .fingerprint(FingerprintProfile.Firefox133)
  .build();

Timeout Configuration

const { Client, timeoutsApiDefaults, timeoutsStreamingDefaults } = require('@specter/client');

// Use preset timeout configurations
const client1 = Client.builder().apiTimeouts().build();
const client2 = Client.builder().streamingTimeouts().build();

// Or configure manually
const timeouts = {
  connect: 10.0,      // TCP + TLS handshake
  ttfb: 30.0,         // Time to first byte
  readIdle: 60.0,     // Max time between chunks
  total: 120.0        // Total request deadline
};

const client = Client.builder().timeouts(timeouts).build();

HTTP Methods

const { Client } = require('@specter/client');

const client = Client.builder().build();

// GET
const response = await client.get('https://api.example.com/items').send();

// POST
const response = await client.post('https://api.example.com/items').send();

// PUT
const response = await client.put('https://api.example.com/items/1').send();

// DELETE
const response = await client.delete('https://api.example.com/items/1').send();

// PATCH
const response = await client.patch('https://api.example.com/items/1').send();

// HEAD
const response = await client.head('https://api.example.com/items/1').send();

// OPTIONS
const response = await client.options('https://api.example.com/items').send();

// Arbitrary method
const response = await client.request('PURGE', 'https://api.example.com/cache').send();

Response Handling

const response = await client.get('https://api.example.com/data').send();

// Status code
console.log(response.status);

// Headers
console.log(response.headers);  // Record<string, string>
console.log(response.getHeader('content-type'));

// Body
console.log(response.text());      // Decompressed text
console.log(response.json());      // JSON string (use JSON.parse)
const data = response.bytes();     // Buffer

// Response metadata
console.log(response.httpVersion); // "HTTP/2", "HTTP/1.1", etc.
console.log(response.isSuccess);   // true for 2xx status

## Request Builder

```javascript
const { Client } = require('@specter/client');

const client = Client.builder().build();

const response = await client
  .post('https://api.example.com/items')
  .header('Authorization', 'Bearer token')
  .json(JSON.stringify({ name: 'example' }))
  .send();

console.log(response.status);

## Development

```bash
# Install dependencies
npm install

# Build the native module
npm run build

# Run tests
npm test

License

MIT