
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@sugarch/bc-mod-utility
Advanced tools
A collection of utilities designed to simplify and enhance the development of mods for Bondage Club (BC). This package provides reusable tools and helpers to streamline common tasks in modding.
Install the package using your preferred package manager:
# Using pnpm
pnpm add @sugarch/bc-mod-utility --save-dev
# Using yarn
yarn add @sugarch/bc-mod-utility --dev
# Using npm
npm install @sugarch/bc-mod-utility --save-dev
The Messager class is the main utility provided by this package. It allows you to send various types of messages in the chat room.
import { Messager } from '@sugarch/bc-mod-utility';
// Create a new Messager instance
const messager = new Messager();
// Send a custom action message
messager.action('This is a custom action message.');
// Send a chat message
messager.chat('Hello, everyone!');
// Send a local action message (only visible locally)
messager.localAction('This is a local action message.');
// Send a whisper to a specific player
messager.whisper(12345, 'This is a private message.');
// Send a beep notification to a specific player
messager.beep(12345, 'You have a new notification!');
Globals and onceThe Globals class provides a way to manage global variables and ensure that certain functions are only executed once.
import { Globals, once } from '@sugarch/bc-mod-utility';
// Create a new Globals instance, or retrieve an existing one
// the first parameter is the name of the global variable, should be unique.
const globals = Globals.get("MyGlobalName", () => {
// This function will only be executed once if the global variable
// is not already set
return new MyGlobalObject();
});
// Like the `get` method, but allows for modifying the existing global
// variable
const globals2 = Globals.getMayOverride("MyGlobalName2", (old) => {
// if the global variable does not exist, the parameter `old` will
// be `undefined`.
// Here we can create a new instance of `MyGlobalObject2`
if(!old) return new MyGlobalObject2();
// Here, the `old` parameter is the existing global variable
// We can modify it as needed
old.registerSomeData();
return old;
});
// The `once` method allows you to register a function that will only
// be executed once, even if called multiple times or imported
// multiple times.
// The first parameter is a unique flag name, and the second parameter
// is the function to be executed.
once("MyOnceFlagName", () => {
// This function will only be executed once, even if called multiple
// times, or the script imports multiple times
// It is useful for initializing global variables or performing setup
// tasks
console.log('This will only run once!');
});
FAQs
Various utility for BC mods.
We found that @sugarch/bc-mod-utility demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.