npm

Need private packages and team management tools?Check out npm Orgs. »

can-haz-package

1.0.1 • Public • Published

can-haz-package

npm travis

Check if an npm package name is valid and does not currently exist.

uses validate-npm-package-name to check naming rules and uses npm view (via shelljs) to check if the package exists.

The return values are set up to conform to inquirer's validate function expectations.

Because of the reliance on shelljs and npm, this package will not work in the browser, sorry!

Install

npm install can-haz-package

Usage

var canHazPackage = require('can-haz-package')
 
canHazPackage('this-should-never-be-taken-omg-whaaaat-999')
// reurns true
 
canHazPackage('standard')
// returns 'Sorry, that package name is taken! :('
 
canHazPackage(' ¯\_(ツ)_/¯ ')
// returns 'Package name does not conform to naming rules.'
 

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

ISC

install

npm i can-haz-package

Downloadsweekly downloads

1

version

1.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability