Socket
Socket
Sign inDemoInstall

4chan-full

Package Overview
Dependencies
141
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    4chan-full

www.4chan.org non-official read only api. That supports cool things!


Version published
Maintainers
1
Install size
12.5 MB
Created

Readme

Source

4CHAN-FULL 🎉

www.4chan.org non-official read only api.


Installation

npm install 4chan-full

Possibilities

Example Codes

That small script lists all files of the thread..

const { fchf } = require("4chan-full");

(async () => {
  const thread = await fchf.thread("wg", "7694540");

  // thread.file -> Thread owner (OP) file.
  // thread.replies[?].file -> reply file.

  const files = [thread.file, ...thread.replies.map((i) => i?.file)].filter(
    (i) => i != null
  );

  console.log(files);
})();

That small script watches the thread for new replies..

const { fchf } = require("4chan-full");

(async () => {
  let watcher = fchf.threadWatcher("vg", "337012489");

  // Events: updated, nowUpdated, checked, error, #start, #stop

  watcher.on("updated", (oldThread, newThread) => {
    console.log({ oldThread, newThread });
  });

  watcher.on("notUpdated", () => {
    console.log("there is no new replies..");
  });

  watcher.on("checked", (oldThread, newThread) => {
    console.log("checked new checkInterval:", watcher.checkInterval);
  });

  watcher.start();
})();

TODO

  • Full Code REWRITE
  • Parse Message Contents (Quotes etc.)
  • Thread Update Watcher
  • Board Update Watcher

Type List

HUGE Update 1.2.0

  • Thread Watcher
  • Update Boards
  • Bug fixes

Update 1.1.1

  • Parse Message Contents
  • Add Type List To README MD

HUGE Update 1.1.0

  • Full Rewrite API
  • Update README MD

Keywords

FAQs

Last updated on 26 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc