npm-valid
check if a packages'name is valide & to publish on npm
Install
npm install npm-valid --save-dev
Usage
const isvalid = ; isvalid; //return true isvalid; //return true isvalid; //return true isvalid; //return false
also you will get object return like this
isvalid: false errors: "os is a core module in node !" rules: tips: "name can't be the same name as a core Node module"
cli
$ npm-valid --help Usage $ npm-valid <name> … Options --strict, -s strict validation for name --error, -e display error if <name> not valide --tips, -t display tips if <name> not valide --rules, -r display rules if <name> not valide Examples $ npm-valid check-it √ check-it is valid $ npm-valid _request × _request is not valid ! $ npm-valid os -s -e × os not valid ! × os is a core module in node !
API
npmvalid([name], options)
name
Type: string
given name.
options
Type: object
given strict option true or false .
License
MIT © abdelhak akermi