variable-name-generator
v1.0.0
Published
Unique variable name generator from keywords
Downloads
3
Maintainers
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 namemaxLength
(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! 😄