3 ms·
It's probably better to think of a given file as a "module" which is what it effectively is. I only say this because I'm not very fond of class based programmi
by tracker1 12y ago
It's probably better to think of a given file as a "module" which is what it effectively is. I only say this because I'm not very fond of class based programming in JS, and usually prefer a functional approach. For me, objects are generic constructs and my modules export functions that can be composed/used against said generic/plain objects.
By using a more functional approach, you can chain promises or streams very effectively[1].
[1] https://twitter.com/tracker1/status/558390877563801601 https://twitter.com/tracker1/status/558390877563801601