3 ms·
I understand the evented nature of Node.js and I'm not taking that away. In the code example I gave I'm still using the async methods. DirectoryScanner.scanLib
by Offler 14y ago
I understand the evented nature of Node.js and I'm not taking that away. In the code example I gave I'm still using the async methods.
DirectoryScanner.scanLibraries = function(librariesRoot) {
// Asynchronous Function Callback function
// | |
fs.readdir(librariesRoot, this.onLibrariesDirRead.bind(this));
};
All I've done is pass in a bound method on an object as the callback function. OOP does work for Node as far as I can tell I broke nothing with my code, it's all async/evented...
Can you give me an example as to how my coding style would break Node? I'm genuinely confused.