packageNameProblem
Why name cannot be a new package's name, or undefined when npm accepts it: lowercase, no spaces, URL-safe, at most 214 characters, optionally scoped, and not a name npm reserves.
Why name cannot be a new package's name, or undefined when npm accepts it: lowercase, no
spaces, URL-safe, at most 214 characters, optionally scoped, and not a name npm reserves.
Import#
ts
import { packageNameProblem } from "create-shadow-app";
Signature#
ts
function packageNameProblem(name: string): string | undefined
Parameters#
| Name | Description |
|---|---|
name |
Candidate name. |
Returns#
The problem, in a sentence that says how to fix it, or undefined.
Examples#
ts
packageNameProblem("http"); // '"http" cannot be a package name: ... Choose another name, or add a scope such as @you/http.'