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

@doctor_internet/intergroup

v0.0.5

Published

Small package for managing external groups into discord roles.

Readme

InterGroup

InterGroup is a simple package to map input values to output values, initially designed for mapping mybb group ids to discord guild ids.

Classes

AbstractGroupHandler

The abstract group handler only has internal handlers for mapping internal IDs to external IDs, designed to be as abstract as possible.

addX

The addX methods are used to add mappings to the object, and come in multiple varients.

addMapping

addMapping takes a single ID, and either a single or array value, and maps one to the other, in a very simple form. If the input groups contain the ID, add all the values to the output.

addPair

addPair takes two IDs, and either a single or array output value, and requires both be present to add to the output.

addUnpair

addUnpair takes two IDs, and requires the first and not having the second be present to add the outputs.

addManaged

addManaged takes a single output value, to add unmapped but managed IDs (such as for deprecated groups), which should be handled, but don't have an active input to output mapping.

resolve

The resolve function takes a single input value, and maps it to the corresponding simple output value. This however, doesn't handle pairs or removals, since it only takes a single input value.

resolveAll

The resolveAll function takes an array, returning all mapped values, along with any pair/unpair variants.

handleGroup

handleGroup is the most complex function, taking both an array of input groups, and an array of current output groups. From this, it resolves the required output groups, using resolveAll, then returns an array of groups to add (which aren't currently on the user), and an array to remove.

DiscordGroupHandler

The DiscordGroupHandler is much the same as the Abstract handler, yet has code specifically written to interface with Discord.js, to handle discord role IDs as outputs, and setting roles on Guild Members.

resolveMember

resolveMember takes a GuildMember and an array of input values, and handles them with handleGroup, again return the add/remove arrays.

handleMember

handleMember uses resolveMember to add/remove the groups, bringing it into sync.