Found this strange looking URL which is working by the way.
var _ = require('./.');
Can someone explain what this will do in reality and why they are doing it ?
It may be a typo, but it is normalized to ..
If you're ever curious about how a path is resolved in Node.js, you can use path methods and require.resolve to see what is going on.
> path.normalize('./.')
'.'
> path.normalize('././././././././.')
'.'
> require.resolve('./.') // assuming `index.js` exists...
'/path/to/index.js'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With