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

@jub0t/grepper

v1.0.5

Published

A Light-weight Wrapper for CodeGrepper APIs

Downloads

3

Readme

GREPPER Overall Downloads

yarn add grepper
npm install grepper
const GREPPER = require("grepper");

Quick Guide

Global

checkToken()

To check if a token is valid use this function. The first parameter is the ACCESS_TOKEN.

async function __main__() {
  GREPPER.checkToken("YOUR_ACCESS_TOKEN_HERE")
    .then((res) => {
      // Your Code Goes Here
    })
    .catch((err) => {
      console.log(err);
    });
}
__main__();

Login()

Login with username & password.

async function __main__() {
  const Account = await GREPPER.Login({
    email: process.env.EMAIL, // Your Account Email
    password: process.env.PASSWORD, // Your Account Password
  });
  console.log(Account);
}
__main__();
{
  "errors": [],
  "success": true,
  "access_token": "",
  "user_id": 0,
  "email": "",
  "hide_grepper_button": 0,
  "grepper_user_langs": [
    {
      "lkey": "abap",
      "name": "Abap",
      "enabled": 0
    }
  ],
  "blacklists": []
}

Signup()

Signup with username & password.

async function __main__() {
  const Account = await GREPPER.Signup({
    email: process.env.EMAIL, // Account Email
    password: process.env.PASSWORD, // Account Password
  });
  console.log(Account);
}
__main__();
{
  "Success": true,
  "Message": "Successfuly Registered New Account.",
  "Data": {
    "errors": [],
    "success": true,
    "access_token": "",
    "user_id": 1,
    "email": "string",
    "hide_grepper_button": null,
    "grepper_user_langs": [
      {
      "lkey": "abap",
      "name": "Abap",
      "enabled": 0
      }
    ],
    "blacklists": [],
  },
};

getCommunity()

Function to get codegrepper top users(community) from the community page. The first parameter is the [Token][], The second parameter is limit of users to get(default: 100).

async function __main__() {
  Data = await GREPPER.getCommunity("YOUR_ACCESS_TOKEN", 200);
  console.log(Data);
}
__main__();

sendPasswordResetEmail()

Sends a reset password email to the provided email address.

async function __main__() {
  Data = await GREPPER.sendPasswordResetEmail("[email protected]");
  console.log(Data);
}
__main__();

Users

userInfo()

Fetches code Grepper user's profile information. The first parameter is the user_id(int).

async function __main__() {
  Data = await GREPPER.userInfo(98467);
  console.log(Data);
}
__main__();

userByToken()

Fetches code Grepper user's information by their ACCESS_TOKEN.

async function __main__() {
  Data = await GREPPER.userByToken("YOUR_ACCESS_TOKEN");
  console.log(`Successfuly Logged in as ${Data.Name}`);
}
__main__();

userBeltStats()

Fetches The user's code grepper belt stats. The first parameter is the user_id(int).

async function __main__() {
  Data = await GREPPER.userBeltStats(98467);
  console.log(Data);
}
__main__();

userStats()

Fetches The user's code grepper helped and problems solved stats. The first parameter is the user_id(int).

async function __main__() {
  Data = await GREPPER.userStats(98467);
  console.log(Data);
}
__main__();

userTopAnswers()

Fetches The user's top code grepper answers. The first parameter is the user_id(int).

async function __main__() {
  Data = await GREPPER.userTopAnswers(98467);
  console.log(Data);
}
__main__();

searchUsers()

Searches for code grepper users The first parameter is the user_name(str).

async function __main__() {
  Data = await GREPPER.searchUsers("Jareer");
  console.log(Data);
}
__main__();

getWhoToFollow()

This functions gets all the recommended users to follow that you can find on the feed page, first parameter is ACCESS_TOKEN.

async function __main__() {
  Data = await GREPPER.getWhoToFollow("YOUR_ACCESS_TOKEN");
  console.log(Data);
}
__main__();

Answers

getAnswers()

Fetches coding answers from code grepper, enter the query in the first parameter.

async function __main__() {
  Data = await GREPPER.getAnswers("js loop");
  console.log(Data);
}
__main__();

getComments()

Fetches comments from code grepper coding answers, first parameter is answerId(int).

async function __main__() {
  Data = await GREPPER.getComments(23);
  console.log(Data);
}
__main__();

getSimiliarQueries()

Fetches similiar queries like the one provided, eg, if you enter js loop it will return javascript loop, loop in javascript, loop javascript

async function __main__() {
  Data = await GREPPER.getSimiliarQueries("js loop");
  console.log(Data);
}
__main__();

Settings

enableCommentNotif()

Enables your comment notifications from the settings.

async function __main__() {
  Data = await GREPPER.enableCommentNotif("YOUR_ACCESS_TOKEN");
  console.log(Data);
}
__main__();

disableCommentNotif()

Disables your comment notifications from the settings.

async function __main__() {
  Data = await GREPPER.disableCommentNotif("YOUR_ACCESS_TOKEN");
  console.log(Data);
}
__main__();

getPrivacySettings()

Gets you privacy settings.

async function __main__() {
  Data = await GREPPER.getPrivacySettings("YOUR_ACCESS_TOKEN");
  console.log(Data); // Data.Data is the actual object with data
}
__main__();

Example Usage

// Fetching Privacy Settings By Username & Password
async function __main__() {
  const Account = await GREPPER.Login({
    email: "[email protected]",
    password: "[email protected]",
  });
  const Data = await GREPPER.Login({
    token: Account.Data.access_token,
    userId: Account.Data.user_id,
  });
  console.log(Data);
}
__main__();