Skip to content

Instantly share code, notes, and snippets.

@MylesBorins
Created July 25, 2016 23:32
Show Gist options
  • Save MylesBorins/abb71c94d416b02a6981472f3000afc4 to your computer and use it in GitHub Desktop.
Save MylesBorins/abb71c94d416b02a6981472f3000afc4 to your computer and use it in GitHub Desktop.
With require and export
function init() {
console.log('initESLibraryFS is started!');
}
module.exports = {
init: init
}
var fs = require('fs'); // Basic File System API
var helper = require('./helper');
setTimeout(helper.init, 2000);
@MylesBorins
Copy link
Author

Notice there is not need to make a proxy function as was done in the original. You can simply pass the function as an argument!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment