Git Product home page Git Product logo

npm-available's Introduction

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

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

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

Usage

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

npm-available's People

Contributors

watson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

npm-available's Issues

Using as library

@watson This is a ๐Ÿ†’ project! Can you please separate the cli part into another file and allow using this module as library?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.