-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
I checked the commit history and didn't find any answers - but it seems the leading/trailing space message is unnecessary given that spaces are not url safe.
const result = validateNpmPackageName(' ')
const message = result.errors.concat(result.warnings).join('\n')
console.log(message)
// outputs
// name cannot contain leading or trailing spaces
// name can only contain URL-friendly charactersAnd if you're concerned with letting users know they have unexpected leading/trailing spaces in their package name, why not leave out the leading/trailing bit and just say spaces are not allowed? Leading/trailing implies that spaces in between are valid.
rap2hpoutre
Metadata
Metadata
Assignees
Labels
No labels