open-index/open-npm huggingface dataset:
npm package: 4chan-boards
Description: Get a board's name and type given its short name (eg. `/b/`).
Author: scootykins
Latest version: 2.0.1

# 4chan-boards

Get a board's name and type given its short name (eg. `/b/`).

### 2.0.0 BREAKING CHANGES

Enumerated types are now `Symbol`s, so relying on falsy evaluation will no longer work:

```js
const boards = require('4chan-boards')

if (boards.getType('b')) {
  console.log('This will not print!')
}
```

Instead, use the provided enumerated types:

```js
if (boards.getType('b') !== boards.INVALID) {
  console.log('This message prints! Yay!')
}
```

## Installation

```bash
yarn add 4chan-boards

# OR

npm install --save 4chan-boards
```

## Usage

```js
const boards = require('4chan-boards')

console.log(boards.getName('wsg'))                // Worksafe GIF
console.log(boards.getType('b') === boards.NSFW)  // true
```

## API

### Methods

Get information (ie name or type) about a board.

* **boards.getName(board)**
* **boards.getType(board)**


### Objects

Objects mapping short names to full names. `boards.all` contains the mapping for all the boards, `boards.sfw` contains mapping for only the SFW boards, etc.

* **boards.all**
* **boards.admin**
* **boards.nsfw**
* **boards.sfw**


### Enumerated types

`boards.getType(board)` will return an enumerated type, which has been implemented as a `Symbol`

* **boards.ADMIN**
* **boards.NSFW**
* **boards.SFW**
* **boards.INVALID**
npm package: 4chan-ts
Description: A typescript client wrapper for 4chan api
Author: 3IMAD
Latest version: 0.0.4

# 4chan-ts

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

This package provides simple access to [4chan's public JSON API](https://github.com/4chan/4chan-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

---

## 📦 Installation

### Using [Bun](https://bun.sh)

```bash
bun add 4chan-ts
```
### Using [NPM]
```bash
npm install 4chan-ts
```

### Quick Start

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


(async ()=>{
  const chan = new FourChanClient();

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