4 ms·
For all the things wrong with node, I envy the relative filename importing they have when writing Python.
by kristaps 3y ago
For all the things wrong with node, I envy the relative filename importing they have when writing Python.
- DemocracyFTW2 3y agowhen I moved from Python to NodeJS years ago the way that `require( './path/to/file.js' );` works was a total revelation. There are still arguments being mafe about NodeJS's `require` rules being too complicated (e.g. using optionally implicit extensions) but even with that, NodeJS's `require()` method is hands down superior to Python's `import` statement.