georgemandis / konami-js

Adding the Konami Code easter egg to your projects since 2009! Compatible with gestures on smartphones and tablets as well. Compatible with all front-end frameworks and vanilla JavaScript
http://konamijs.mand.is/
MIT License
961 stars 121 forks source link

Add module.exports #32

Closed rejas closed 7 years ago

rejas commented 7 years ago

Added a module.exports line so that I can use it in my webpack project.

georgemandis commented 7 years ago

A lot of people simply include the script in their static HTML sites outside of any module management schemes. If we include this line it's going to generate an error on the page. That might not matter or break anything, but it kind of bothers me :)

Can you change it to a conditional to make sure the module object exists first?

rejas commented 7 years ago

You're right. I added some code to check for that