Naming Prosecution Mitigator

    npm-package-name-available

    1.0.4 • Public • Published

    npm-package-name-available

    License NPM Package Version GitHub top language Size Last Commit

    checks if a name is a valid npm package name and if it's available to be used to push a new package to npm.

    Usage without installation

    $ npx npm-package-name-available name
    
    # Or multiple names at once
    $ npx npm-package-name-available name alt-name alt-name-2 ... alt-name-n

    Installation

    $ npm i npm-package-name-available

    Usage

    Require CommonJS (default)
    const npm_package_name_available = require("npm-package-name-available");
    Import ES-Module (default)
    import npm_package_name_available from "npm-package-name-available";
    Import ES-Module (named)
    import { npm_package_name_available } from "npm-package-name-available";

    Checks

    Check for one name at a time returns a boolean value, for example

    npm_package_name_available("my-package-name");
    //=> true
    npm_package_name_available("express");
    //=> false

    Checks for multiple names at once, will return an array of objects, for example

    npm_package_name_available([
        "http-status-code",
        "http-code",
        "readable-http-status-code",
        "http-status-quo",
        "status-quo",
        "@kdts/http-status-code",
        //
    ]).then(results => {
        console.log(results);
    });
    
    //=> [
    //   { 'http-status-code': false },
    //   { 'http-code': false },
    //   { 'readable-http-status-code': true },
    //   { 'http-status-quo': true },
    //   { 'status-quo': false },
    //   { '@kdts/http-status-code': true }
    // ]

    License

    See LICENSE.

    Copyright

    Copyright © 2022. Kossi D. T. Saka.

    Install

    npm i npm-package-name-available

    DownloadsWeekly Downloads

    7

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    8.16 kB

    Total Files

    6

    Last publish

    Collaborators

    • kdts