Skip to content

TheCyaniteProject/node-mommy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-mommy

Mommy’s here to support you when you're running Node~ ❤️
Let node-mommy brighten your logs and error messages – because mommy knows how amazing you are~ 💞


Installation

Install node-mommy with npm:

npm install node-mommy

Then, in your application, just import it:

import 'node-mommy';

From now on, all your console.log and console.error calls will be replaced with adorable messages from mommy!


Usage

Once node-mommy is required, it intercepts all console messages and swaps them out with heartwarming messages. For example:

Before:

console.log("Processing your data...");
console.error("An error occurred!");

After requiring node-mommy, you might see messages like:

  • "Processing your data... mommy knows you're doing amazing, little girl~ ❤️"
  • "An error occurred! Don't worry, mommy believes in you even when things go wrong!"

Fetching Mommy's Responses

You can now also fetch mommy's responses from your console.log/console.error commands. This can be useful if you want to display the messages in a custom interface or log them elsewhere. For example:

// Code snip from kieee's control panel
const mommyResponse = console.log(message);
mainWindow.webContents.send('print-log', `${message.trim()}\n${mommyResponse}`, idname);

Simply run your Node.js application as you normally would, and let node-mommy do the rest!


Configuration

Mommy personalizes her messages using the following environment variables. All of these options can take a / separated list, and mommy will randomly select one for each message:

  • NODE_MOMMYS_LITTLE
    What mommy should call you.
    Default: "girl"

  • NODE_MOMMYS_PRONOUNS
    Which pronouns mommy uses for herself.
    Default: "her"

  • NODE_MOMMYS_ROLES
    The role mommy will have.
    Default: "mommy"

  • NODE_MOMMYS_EMOTES
    The emotes mommy will decorate her messages with.
    Default: "❤️/💖/💗/💓/💞"

  • NODE_MOMMYS_MOODS
    The set of responses mommy can use (possible values include "friendly" "chill" or "ominous").
    Default: "chill"

Mommy also supports additional variables for controlling the frequency of her messages:

  • NODE_MOMMYS_ATTENTION
    The number of console.log messages that can pass before mommy sends another supportive message.
    Default: 1

  • NODE_MOMMYS_PATIENCE
    The number of console.error messages that can pass before mommy chimes in.
    Default: 1


Fallback to cargo-mommy Settings

If you have cargo-mommy installed and its environment variables are set, node-mommy will use those configurations when the corresponding NODE_MOMMYS variables are not defined. For example, if NODE_MOMMYS_LITTLE isn't set but CARGO_MOMMYS_LITTLE is, then mommy will call you the value set in CARGO_MOMMYS_LITTLE.


Licensing

node-mommy is licensed under the GNU General Public License version 3 (GPLv3). Mommy loves freedom, and so do we~ ❤️


Have Fun!

Let node-mommy sprinkle your logs with love and support – because you deserve nothing less than all the care in the world!

About

Mommy’s here to support you when you're running Node~ ❤️

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published