Originally published on my blog.
No, it doesn’t do much, as you probably guessed from the name. But it’s my first NPM package, and it works. A tiny piece of software that has my name on it. That’s good enough for me.
The package is simple: add it to your dependencies, require and name it like so:
const slayer = require(‘slaaayer’);
The name of the variable doesn’t actually have to be slayer, name it whatever you’d like.
Once you’ve done that, call slayer and pass it a number. The result is “SLAAAYER! 🤘🏻”, where the number you pass the function is the number of “A”s in the word slayer.
will log: SLAAAAAAAAAAYER! 🤘🏻
You can install the package here: https://www.npmjs.com/package/slaaayer
Stay tuned for future NPM packages. I think Cannibal Corpse has a good ring to it…