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(ret.name);
		}

		return ret;
	}));

	spinner.stop();

	for (const pkg of packages) {
		log(pkg);
	}

npm-name

Check whether a package or organization name is available on npm

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis

Popular npm-name functions