Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-name-taken

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-name-taken

Check if an NPM package name is taken

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by151.13%
Maintainers
1
Weekly downloads
 
Created
Source

is-name-taken

npm typescript GitHub stars Twitter Follow

Check if an NPM package name is taken.

Validates an NPM package name and then checks if a conflicting package exists. Also accounts for punctuation differences.

Installation

yarn add is-name-taken
npm install is-name-taken

API

import { isTaken, isValid } from "is-name-taken";

// Check if a package name is taken, and if so, return the conflict:

isTaken("ch-alk"); // "chalk"

// If not taken, return false

isTaken("package-that-doesnt-exist"); // false

// If invalid, return true

isTaken("INVALID_NAME"); // true

// Check if a package name is valid

isValid("chalk"); // true

isValid("INVALID_NAME"); // false

Types:
isTaken(name: string) => Promise<boolean | string>;

isValid(name: string) => boolean;


Dependenciesdependencies


Dev DependenciesDavid


License license

MIT


Keywords

FAQs

Package last updated on 03 Sep 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc