Socket
Book a DemoInstallSign in
Socket

npm-available

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-available

Check if a given module name is available on npm - available as CLI & API

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

npm-available

Check if a given module name is available on npm. Available as CLI and module API.

Build status js-standard-style

Installation

To use on the command line, install globally using:

npm install -g npm-available

To use programmatically, install locally:

npm install --save npm-available

CLI Usage

After you've installed npm-available globally, just run:

$ npm-available my-awesome-module
Too late! my-awesome-module is taken :(

Options

npm-available [options] [name]

Where name is the name of a module you whish to check.

Options:

  --help, -h     show this help
  --version, -v  show version
  --quiet, -q    don't output anything (check the exit code instead)

The command will exit with a non-zero exit code if the module name is already taken.

Programmatic Usage

var npmAvailable = require('npm-available')

npmAvailable('my-awesome-module', function (err, available) {
  if (err) throw err
  if (available) console.log('%s is available', name)
  else console.log('%s is already taken', name)
})

License

MIT

Keywords

cli

FAQs

Package last updated on 24 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts