$ yarn add @richi1717/easter-eggs
Then inside of your client entry point (E.G. index.js
, main.js
, app.js
), add
import '@richi1717/easter-eggs';
That's it!
Now whenever someone enters the code in your app it will (I believe) have an entertaining thing happen. Don't worry, I added cleanup so it will remove itself from your app once the animation is over.
Currently the only available codes are the konami code and the Sonic config code.
Konami: (Start
would actually just be return/enter instead)
When you enter the Konami code, velociryan will bounce in and out of the bottom of your app. A DELIGHT if I may say so myself.
Sonic: UP, c, DOWN, c, LEFT, c, RIGHT, c, a, Return
When you enter the Sonic code, the original sonic screen will scroll up from the bottom.
This was written to mainly enter into the world of open source and npm. I've always thought this would be a fun project to do even though it's "silly". People used to hold the 80s and 90s easter eggs in such high esteem and nostalgia and I wanted to give an easy way to honor that. In the future I'll add more codes and a way to add your own images or gifs. My next addition is adding sonic since that's the code I have remembered all these years from the original Sonic. I have only tested these on Chrome, Firefox, and Safari. It obviously doesn't work on mobile since you have to enter the codes.
This is a taste of what you could see on your own site.