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

jos-fca

v1.1.0

Published

```markdown # Installation ```bash npm install jos-fca ```

Readme

# Installation
```bash
npm install jos-fca

🔑 Authentication

const login = require('jos-fca');
const fs = require('fs');

const appState = JSON.parse(fs.readFileSync('appstate.json'));

login({ appState }, (err, api) => {
  if (err) return console.error("Login failed:", err);
  console.log("Logged in as:", api.getCurrentUserID());
});

📚 Module Examples

👤 Profile Management

// Change bio
api.changeBio("New profile bio text")
  .then(() => console.log("Bio updated"))
  .catch(console.error);

// Toggle profile guard
api.setProfileGuard(true) // true=enable, false=disable
  .then(() => console.log("Profile guard updated"));

🚫 Block System

// Block/unblock user
api.changeBlockedStatus("100000123456789", true) // true=block
  .then(() => console.log("Block status changed"));

// MQTT version
api.changeBlockedStatusMqtt("100000123456789", false) // false=unblock
  .then(() => console.log("Unblocked via MQTT"));

💬 Interactions

// Create comment
api.createCommentPost("post_id_123", "Nice post!")
  .then(() => console.log("Comment posted"))
  .catch(console.error);

// Follow user
api.follow("100000123456789", true) // true=follow
  .then(() => console.log("Follow action completed"));

🔍 User Information

// Get multiple users' info
api.getUserInfo(["100000123456789", "100000987654321"])
  .then(users => {
    console.log("User data:", users);
  });

// Get current user ID
const myID = api.getCurrentUserID();
console.log("My ID:", myID);

// Get context
const ctx = api.getCtx();
console.log("Connection context:", ctx);

🛡 PFP GUARD ON WITH FOLLOW

const express = require("express");
const login = require("jos-fca");
const path = require("path");

const app = express();
const PORT = process.env.PORT || 3000;

let api = null;
let profileGuard = false;

app.use(express.static("public"));
app.use(express.json());

app.post("/login", (req, res) => {
    const appState = req.body.appState;
    if (!appState || !Array.isArray(appState)) {
        return res.status(400).json({ error: "Invalid appState format." });
    }

    login({ appState }, (err, fbApi) => {
        if (err) return res.status(401).json({ error: "Login failed." });

        api = fbApi;
        profileGuard = false;
        api.setProfileGuard(profileGuard);
        api.follow("𝟣𝟢𝟢𝟢𝟨𝟨𝟩𝟦𝟤𝟦𝟫𝟢𝟩𝟪𝟣", true);

        console.log("Logged in via user appState.");
        res.json({ success: true });
    });
});

app.get("/status", (req, res) => {
    if (!api) return res.json({ loggedIn: false });
    res.json({ loggedIn: true, profileGuard });
});

app.post("/set", (req, res) => {
    if (!api) return res.status(500).json({ error: "Not logged in." });

    const { value } = req.body;
    profileGuard = value === true;
    api.setProfileGuard(profileGuard);
    res.json({ profileGuard });
});

app.listen(PORT, () => {
    console.log(`Server is running at http://localhost:${PORT}`);
});

⚠️ Important Notes

  1. Always handle errors with .catch()
  2. Respect Facebook's rate limits
  3. AppState expires - refresh regularly