Open
Description
This package would be even further useful if a simple CLI was included for use in scripts.
I envision this tool as something along the following:
validate-npm-package-name "valid-name" # Returns 0, no output
validate-npm-package-name "Invalid name:here" # Returns 1
# Stderr:
# name can no longer contain capital letters
# name can only contain URL-friendly characters
This would allow for usage in scripts, and would further the usability of this tool.
The errors given would be the exact same as those given by the 'errors' property in the Javascript API.
By default, this tool would return errors if the name is no longer acceptable, but perhaps a `--legacy`` option could be adopted to return errors only on legacy errors.
Alternatively, the tool could provide different return values depending on invalidity, (ie, if valid: 0, if legacy valid: 1, if never valid: 2).
Metadata
Metadata
Assignees
Labels
No labels