Skip to content

Instantly share code, notes, and snippets.

@maxehnert
Created June 22, 2016 05:07
Show Gist options
  • Save maxehnert/86ccc7eea5ee550073adb1a04008011a to your computer and use it in GitHub Desktop.
Save maxehnert/86ccc7eea5ee550073adb1a04008011a to your computer and use it in GitHub Desktop.
es5 cyclic dependency subtract.js
const addModule = require('./add.js');
exports.countSubtract = 0;
exports.subtractfn = function(n = 0) {
exports.countSubtract++;
console.log('countSubtract', exports.countSubtract);
if (n < 20) return addModule.add(n + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment