Created
November 24, 2015 16:55
-
-
Save PavelPolyakov/236c864e118c392489ac to your computer and use it in GitHub Desktop.
module.exports overwrite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('./rand')()(); | |
require('./rand')()(); | |
require('./rand')()(); | |
require('./rand')()(); | |
require('./rand')()(); | |
require('./rand')()(); | |
require('./rand')()(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
module.exports = function() { | |
var fn; | |
var rand = Math.floor((Math.random() * (4 - 1) + 1)); | |
switch (rand) { | |
case 1: | |
fn = function() { | |
console.log('1111') | |
}; | |
break; | |
case 2: | |
fn = function() { | |
console.log('2222') | |
}; | |
break; | |
case 3: | |
fn = function() { | |
console.log('3333') | |
}; | |
break; | |
} | |
return fn; | |
}; | |
return function() { | |
console.log('STABLE'); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment