How to use npm-name - 1 common examples

To help you get started, we’ve selected a few npm-name examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / npm-name-cli / cli.js View on Github external
(async () => {
	const result = await npmName.many(input);

	const packages = await Promise.all([...result].map(async ([name, isAvailable]) => {
		const ret = {name, isAvailable, isOrganization: organizationRegex.test(name)};

		if (!isAvailable && !ret.isOrganization) {
			ret.isSquatter = await squatter(;

		return ret;


	for (const pkg of packages) {


Check whether a package or organization name is available on npm

Latest version published 6 months ago

Package Health Score

66 / 100
Full package analysis

Popular npm-name functions

Popular JavaScript code snippets

Find secure code to use in your application or website