DEV Community

Cover image for My Very First NPM Package: SLAAAYER!
Gavi Schneider
Gavi Schneider

Posted on

My Very First NPM Package: SLAAAYER!

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);
Enter fullscreen mode Exit fullscreen mode

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.

console.log(slayer(10));
Enter fullscreen mode Exit fullscreen mode

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…

Top comments (13)

Collapse
 
brianmmdev profile image
Brian Morrison II

I'd like to report a bug with this package. I feel that what better describes the sound that a fellow metal head makes while intoxicated at a concert is SLAYEEEEEEERRRR! rather than SLAAAAAAAER!

Lol I kid. I love this, rock on 🤘

Also, you seriously made me miss festivals this year 😢

Collapse
 
gschnei profile image
Gavi Schneider

I feel you man, my Hellfest plans went down the drain, and I was supposed to be seeing Maiden this month :(
Mixing metal into my coding has helped keep me sane.

Collapse
 
daviddalbusco profile image
David Dal Busco

🤘🏻

Collapse
 
vadymstebakov profile image
Vadym

Well done😁

Collapse
 
gschnei profile image
Gavi Schneider

Thank you!

Collapse
 
straleb profile image
Strahinja Babić

Way to go, dude, 🤘🏻

Collapse
 
gschnei profile image
Gavi Schneider

Thank you!

Collapse
 
dobis32 profile image
Scott VanderWeide

\m/

Collapse
 
khuongduybui profile image
Duy K. Bui

Congrats!
However, you should put the source repo in the package since you listed it under ISC (open source).

Collapse
 
gschnei profile image
Gavi Schneider

Thanks for the heads up, was unaware of that.

Collapse
 
shubhamk profile image
Shubham Kamath

This is just amazing. Congratulations 😍
First package should be celebrated!

Collapse
 
gschnei profile image
Gavi Schneider

Thank you, Shubham!

Collapse
 
juniordevforlife profile image
Jason F

Hail