Skip to content

Instantly share code, notes, and snippets.

@barisusakli
Last active October 24, 2020 21:05
Show Gist options
  • Save barisusakli/bde4b0faf0d9b15b4f08 to your computer and use it in GitHub Desktop.
Save barisusakli/bde4b0faf0d9b15b4f08 to your computer and use it in GitHub Desktop.
module wrapper
for (var key in mongoModule) {
// if (mongoModule.hasOwnProperty(key)) {
// saveFunction(key, mongoModule);
// }
// }
// function saveFunction(key, module) {
// if (typeof module[key] === 'function') {
// var oldFn = module[key];
// module[key] = async function (...args) {
// console.log(key, args[0]);
// return oldFn.apply(module, arguments);
// };
// }
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment