Skip to content

Instantly share code, notes, and snippets.

@PavelPolyakov
Created November 24, 2015 16:55
Show Gist options
  • Save PavelPolyakov/236c864e118c392489ac to your computer and use it in GitHub Desktop.
Save PavelPolyakov/236c864e118c392489ac to your computer and use it in GitHub Desktop.
module.exports overwrite
require('./rand')()();
require('./rand')()();
require('./rand')()();
require('./rand')()();
require('./rand')()();
require('./rand')()();
require('./rand')()();
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