Can I not put 2 functions in one mopdule?



  • This is realy irritating.

    I'm trying to put 2 or more functions in one module for structure reasons like this:

    *****

    module.exports = {
        MK1: function() {
            return [WORK,CARRY,MOVE];
        }
    };

    module.exports = {
        MK2: function() {
            return [WORK,WORK,CARRY,MOVE];
        }
    };

    *****

    It works in some cases but from one moment to the other it screams "MK2 is not a function". Even though nothing major changed.

    Do I realy need to create a new module for every function?


  • Culture

    module.exports = {
        MK1: function() {
            return [WORK,CARRY,MOVE];
        },
        MK2: function() {
            return [WORK,WORK,CARRY,MOVE];
        }
    };