Created
July 25, 2016 23:32
-
-
Save MylesBorins/abb71c94d416b02a6981472f3000afc4 to your computer and use it in GitHub Desktop.
With require and export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init() { | |
console.log('initESLibraryFS is started!'); | |
} | |
module.exports = { | |
init: init | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); // Basic File System API | |
var helper = require('./helper'); | |
setTimeout(helper.init, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!