GT2/GT2-iOS/node_modules/decache/lib/mymodule/index.js

24 lines
510 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
var hello = require('../othermodule.js'); // require a second ("child") mondule
// micro-module to test functionality
(function() {
'use strict';
var runcount = false;
console.log("Hello module says: " + hello()); // super useful module ;-)
var get = function () {
return runcount;
}
var set = function () {
runcount = runcount + 1;
return runcount;
}
module.exports = {
get: get,
set: set
};
}()); // benalman.com/news/2010/11/immediately-invoked-function-expression