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 🙏

© 2024 – Pkg Stats / Ryan Hefner

character-forge

v1.3.2

Published

A powerful NPM package for generating procedural characters with randomized attributes like name, surname, sex, gender, personality traits and more.

Downloads

20

Readme

character-forge

A powerful NPM package for generating procedural characters with randomized attributes like name, surname, sex, gender, personality traits and more.

Features

CharacterForge offers an extensive list of attributes that can be customized to create well-rounded characters:

  • Names: Generates first names, nicknames, and surnames
  • Physical Appearance: Generates sex, age, hair color, eye color, hair style, body type, height, and weight to create a vivid visual representation.
  • Clothing: Generates the character's clothing style and attire.
  • Background: Generates ethnicity, sexuality and marital status, birth place, and occupation for a comprehensive background story.
  • Psychological Traits: Generates phobias, personality traits, alignment, and hobbies to give your character depth and complexity.
  • Social Aspects: Generates the character's social class and political views to explore their position and beliefs in your world.

Installation

To use character-forge in your project, you can install it using npm:

npm install character-forge

Usage

  1. Import character-forge:

    const CharacterForge = require("character-forge");
    // or using ES6 modules
    // import CharacterForge from 'character-forge';
  2. Create an instance of CharacterForge:

    const forge = new CharacterForge();
  3. Generate a Character:

    const character = forge.forge();
    console.log(character);
  4. Result:

    {
       seed: 0.45064322790130973,
       name: 'Olivia',
       nickname: 'Liv',
       surname: 'Garcia',
       sex: 'female',
       pronouns: {
          subjectPronoun: 'she',
          objectPronoun: 'her',
          possessiveAdjective: 'her',
          possessivePronoun: 'hers'
       },
       age: 33,
       hairColor: 'mahogany',
       eyeColor: 'blue',
       hairStyle: 'undercut',
       bodyType: {
          type: 'chubby',
          height: 1.6057030973606743,
          weight: 88.69564021937549
       },
       clothings: {
          headwear: undefined,
          outerwear: 'ski jacket',
          upperbody: 'sweatshirt',
          lowerbody: 'corduroy pants',
          footwear: 'flip-flops',
          accessories: []
       },
       ethnicity: 'east asian',
       skinTone: 'light',
       birthplace: 'South Korea',
       religion: 'buddhism',
       sexuality: {
          sexuality: 'asexual',
          relationshipStatus: 'single',
          pastPartners: 2,
          seriousRelationship: 4,
          relationshipHistory: [
             {
              partner: { name: 'Ava', surname: 'Johnson', age: 35 },
              nature: 'serious',
              duration: 'short-term'
             },
             {
               partner: { name: 'Benjamin', surname: 'Martin', age: 33 },
               nature: 'serious',
               duration: 'short-term'
             }
          ]
       },
       occupation: 'cleaner',
       phobia: undefined,
       personalityTraits: [
          {
             name: 'disorganized',
             type: 'negative',
             contradictions: [ 'organized' ]
          },
          {
             name: 'intuitive',
             type: 'positive',
             contradictions: [ 'analytic' ]
          },
          {
             name: 'confident',
             type: 'positive',
             contradictions: [ 'insecure' ]
          },
          {
             name: 'humble',
             type: 'positive',
             contradictions: [ 'arrogant' ]
          },
          {
             name: 'open-minded',
             type: 'positive',
             contradictions: [ 'closed-minded' ]
          }
       ],
       socialClass: 'underclass',
       politicalView: 'center',
       hobbies: [ 'chess', 'baking', 'backpacking' ],
       alignment: 'lawful neutral',
       summary: 'Olivia "Liv" Garcia, 33, is a cleaner with a penchant for chess, baking, and backpacking. She radiates intuitive, confident, humble, and open-minded traits.     A touch of disorganized traits surfaces now and then.\n' +
          '\n' +
          'Hailing from South Korea, Olivia takes pride in her East asian heritage. Her role as cleaner sheds light on her perspectives.\n' +
          '\n' +
          'Physically, Olivia is chubby and stands at 1.61m with 88.70 kg. She has mahogany undercut hair and blue eyes.'
       }

You can can also use modules to retrieve specific details.

Generating a random surname

const surnamesModule = new SurnamesModule();
const surname = surnamesModule.getRandomSurname();

console.log(surname);

Contributing

Contributions are welcome! If you'd like to improve this package or add new features, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.