Check similar names in npm registry.
Upon first use it downloads all module names from npm registry. Subsequent downloads include only updated modules names and are much smaller.
npm install -g validate-name
validate-npm-name my-package
-Don't update downloaded file if it is updated in last 1440 minutes (24 hours). Default is 60 minutes.
validate-npm-name my-package --max-age 1440
Use your own NPM server
validate-npm-name my-package --url https://my.server.com --urlAll https://my.server.com/_all_docs
This module is based on best effort. NPM's similarity algorithm is not open source, so this similarity check can not guarantee validity of your package name.
Thanks to RobC for the idea and Regular Expression. Original script is here created by RobC.