Catalog npm
PACKAGE EXPLORERView in registry

4chan-ts

npm

A typescript client wrapper for 4chan api

4chan4chan api4chan api typescript4chan types
Versions collected5
Direct dependencies6From release 0.1.0
Last observed20 Oct, 20:07 UTC

README

Current package documentation

4chan-ts

A modern and typed 4chan API wrapper written in TypeScript.

This package provides simple access to 4chan's public JSON API, supporting boards, threads, and posts with full type safety.

✨ Features

  • 🌀 Supports all public endpoints of the 4chan API
  • ⚡ Built in TypeScript for type safety and modern dev experience
  • 🧪 Lightweight
  • 🚀 Bun-first, Node/npm-compatible
  • ⏱️ Configurable request timeout
  • 📦 Conditional requests using If-Modified-Since

📦 Installation

Using Bun

bun add 4chan-ts

Using [NPM]

npm install 4chan-ts

Quick Start

import { FourChanClient } from "4chan-ts";

(async () => {
  const chan = new FourChanClient({ timeout: 15_000 });

  const { data, error } = await chan.getBoards();
  if (error) {
    console.error(error);
    return;
  }
  console.log(data); // const data: BoardList
})();

Reuse the same FourChanClient instance for repeated requests. It keeps the latest successful response and its Last-Modified value per endpoint, sends If-Modified-Since on later requests, and returns the cached data when 4chan responds with 304 Not Modified.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 5

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.0Registry latest1 Aug 20266
0.0.47 May 20256
0.0.37 May 20256
0.0.25 May 20256
0.0.14 May 20256

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
3imad69/4chan-ts

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:63d1c2e745681d8bf9eaaaf9fe64cb5c7f1af8751c70b562d799e900c1cce8d3