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

variable-name-generator

v1.0.0

Published

Unique variable name generator from keywords

Downloads

3

Readme

variable-name-generator-js: The Most Unnecessary Name Generator You'll Ever Use!

Hey there, fellow developers!

Have you ever found yourself staring at your code, trying to come up with a variable name that's both unique and meaningful? It's a struggle we all know too well. Well, I've got just the solution for you: variable-name-generator-js!

This JavaScript package is the result of a late-night coding session fueled by too much caffeine and a slightly twisted sense of humor. It's not going to change the world, but it might just make you chuckle while you're debugging at 3am.

Installation

To install this package, just run:

npm install variable-name-generator-js

But be warned, your coworkers might start giving you funny looks when they see your variable names!

Usage

Using variable-name-generator-js is a piece of cake:

const generateName = require('variable-name-generator-js');

const name = generateName(['user', 'data', 'info']);
console.log(name); 
// Outputs something like "UserDataInfo"

Just pass in an array of keywords, and let the package work its magic! The names it generates might not make a whole lot of sense, but hey, that's part of the fun.

API

generateName(keywords, [maxLength])

  • keywords (array of strings): the words you want to mash together into a name
  • maxLength (number, optional, default 50): the maximum length of the generated name

Returns a string that looks like a variable name, but is really just a jumble of your keywords.

Throws an error if you forget to provide keywords or if you pass in something weird.

But Why?

Look, I know what you're thinking. "Who in their right mind would use this?" And honestly, you're probably right. But sometimes, in the midst of all the serious, important code we write, it's nice to have a little something that makes us smile.

Plus, it's open-source, so you can use it, modify it, or even contribute to it if you want. Just don't expect it to be the next big thing in the JavaScript world.

Disclaimer

I take no responsibility for any strange looks, eye rolls, or uncontrollable fits of laughter that may result from using this package. Proceed at your own risk!

License

This package is licensed under the MIT License. So go ahead, use it in your projects, modify it, share it with your friends. Just remember, it's all in good fun!

Happy coding, and may your variable names be ever entertaining! 😄