sindresorhus/npm-name

Names with '-' wrongly reported as available

Closed this issue · 2 comments

require('.')('recursive-readdir').then(console.log)

returns true, while it should return false. What's the reason for name.replace(/[-_.]/g, '')?

I see this was introduced in afe66f6. I'd revert that one as such a mechanism can only work if the conflicting original package does not include one of those characters in its name.