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

yaris-wrapper

v1.2.6

Published

a api wrapper for yaris

Readme

Yaris API wrapper for Node.JS

If you're looking for a Luau (exploiting) version of this, go here.

Information:

This is a API wrapper for Yaris whitelisting system located here. This is intended to help you use their API endpoint system without you hassling around with messy fetch code. Source code here.

Module compatablity:

This works in both ES6 Modules and CommonJS scripts. This module is asyncronous but has callback support. You can either use the method .then() or await, which ever you prefer.

Disclamer!

I did not make Yaris, this is simply an API wrapper for their service. The Yaris discord server is here. Please support them!


Table of contents:


to install:

npm install yaris-wrapper

to get started:

// With ES6 modules
import Yaris from "yaris-wrapper";

// With CommonJS
const Yaris = require("yaris-wrapper")

to define a new connection:

// Using Classes
const yaris = new Yaris("API_KEY")

// Using login function
const yaris = Yaris.login("API_KEY")

List of commands w/ examples:

Important! Error Handling.

when an api end point fails for some reason, maybe if you requested removeKey and provided a wrong key, it will always return the Object below, applies to all endpoints.

{
    success: false,
    error: {
        message: "error_message",
        code: "error_code"
    },
}

Callbacks!

instead of using promises, you could actually use callbacks, each function has a callback for the last argument,

yaris.getInfo((info) => { // add a callback for the 1st argument, since it doesn't take in any other arguments
    console.log(info)
})

yaris.blacklistUser("user_tag", "reason", (info) => { // callback on the last argument.
    if (info.success) {
        console.log(info) // successfully blacklisted
    } else {
        console.error(info.error.message) // failed to blacklist
    }
})

API.getInfo()

  • gets whitelist info
var info = await yaris.getInfo(optional_callback)

info = {
    id: "whitelist_id", // whitelist's id
    owner: "user_id", // owner of whitelist's id
    name: "whitelist_name", // the whitelist name
    description: "whitelist_description" // the whitelist dicription
}

API.addUser()

  • adds a user to whitelist using some sort of data (usually hwid)
var info = await yaris.addUser({
    tag: "user_tag",
    data: "user_data",
    expires: "", // set to never expire
    role: "user_role", // could be anything
}, optional_callback)

info = { // adds user successfully
    success: true,
    message: "Successfully added that user to your script."
}

API.removeUser()

  • removes a user from whitelist using some sort of data (usually hwid)
var info = await yaris.removeUser({
    tag: "user_tag", // uses user's tag
    data: "user_data", // or uses user's hwid
    hashed: false, // [OPTIONAL] change this accordingly to the data field.
}, optional_callback)

info = { // removes user successfully
    success: true,
    message: "Successfully removed that user from your script."
}

API.getUser()

  • gets a users info w/ their tag
var info = await yaris.getUser("user_tag", optional_callback)

info = { // successfully retrieved info
    success: true,
    message: "yes",
    additional: {
        tag: "user_tag",
        data: "user_hashed_hwid",
        expires: "", // sets to never expire
        role: "user_role",
        blacklisted: "false", // if they are blacklisted or whitelisted
        reason: "" // for what reason (if blacklisted)
    }
}

API.editUser()

  • edits a users data using some sort of data (usually hwid)
var info = await. yaris.editUser({
    data: "user_data",     // unhashed or hashed
    hashed: false,         // [OPTIONAL] change this accordingling to the data field.
    tag: "new_user_tag",   // [OPTIONAL]
    expires: "",           // [OPTIONAL]
    role: "new_user_role", // [OPTIONAL]
}, optional_callback)

info = { // successfully edited user.
    success: true,
    message: 'Successfully changed that users tag.'
}

API.whitelistUser()

  • whitelists a user using their user id
var info = await yaris.whitelistUser({
    data: "user_data", // hashed or unhashed
    hashed: false, // [OPTIONAL] change this accordingling to the data field.
}, optional_callback)

info = { // successfully whitelised
    success: true,
    message: "Successfully whitelisted that user to your script."
}

API.blacklistUser()

  • blacklists a user using their user id w/ a reason (optional)
var info = await yaris.blacklistUser(({
    data: "user_data", // hashed or unhashed
    reason: "", // [OPTIONAL]
    hashed: false, // [OPTIONAL] change this accordingling to the data field.
}, optional_callback)

info = { // successfully blacklisted
    success: true,
    message: "Successfully blacklisted that user from your script."
}

API.addKey()

  • generates a key for your whitelist
var info = await yaris.addKey(optional_callback)

info = { // successfully generated a key
    success: true,
    message: "Successfully generated a key for your script.",
    additional: { 
        key: "generated_key"
    }
}

API.removeKey()

  • generates a key for your whitelist
var info = await yaris.removeKey("key", optional_callback)

info = { // successfully removed specified key
    success: true,
    message: "Successfully removed that key from your script."
}

Example Usage

example usage with ES6:

  • uses import instead of require()
  • can be used asyncronously with .then() and await
import Yaris from "yaris-wrapper"; // ES6 Modules only

const yaris = new Yaris("API_KEY")

yaris.getInfo().then(console.log) // gets information about your whitelist

yaris.addUser({
    tag: "user_tag",
    data: "user_data",
    expires: "", // never expires if empty
    role: "user_role" // can be anything
}).then(data => {
    if (data && data.success) {
        console.log(data) // successfully whitelisted
    } else {
        conse.error(data.error)
    }
});

yaris.getKey().then(data => { // adds a key
    if (data.success) {
        const key = data.additional.key // gets the key

        console.log(key)
        yaris.removeKey(key).then(data => { // removes the key
            if (data.success) {
                console.log(data.message) // the success message
            }
        });

        yaris.whitelistUser({
            data: "user_data",
        }).then(data => { // whitelists a user with user data (usually hwid)
            if (data.success) {
                console.log(data.message) // logs the success message
            } else {
                console.error(data.error)
            }
        });
    } else {
        console.error(data.error) // console.errors the error
    }
})

example usage with CommonJS:

  • uses require() instead of import
  • can be used asyncronously with .then() and await
const Yaris = require("yaris-wrapper") // CommonJS only

const yaris = new Yaris("API_KEY")

const main = async () => {
    const info = await yaris.getInfo() // gets information about your whitelist
    console.log(info)

    const addUserData = await yaris.addUser({
        tag: "user_tag",
        data: "user_data",
        expires: "", // never expires if empty
        role: "user_role" // can be anything
    })

    if (addUserData && addUserData.success) {
        console.log(addUserData) // successfully whitelisted
    } else {
        conse.error(addUserData.error)
    }

    const getKeyData = await yaris.getKey()

    if (getKeyData.success) {
        const key = getKeyData.additional.key // gets the key

        console.log(key)

        const removeKeyData = await yaris.removeKey(key)
        
        if (removeKeyData.success) {
            console.log(removeKeyData.message) // the success message
        }

        const whitelistData = await yaris.whitelistUser({
            data: "user_data",
        })

        if (whitelistData.success) {
            console.log(whitelistData.message) // logs the success message
        } else {
            console.error(whitelistData.error)
        }
    } else {
        console.error(getKeyData.error) // console.errors the error
    }
}

Thank you for using yaris-wrapper <3

from NotRllyRn