normalize-package-data
normalize-package-data copied to clipboard
[QUESTION] Does original code accept empty name and/or version string?
Original code:
function validName (file, data) {
if (!data.name) {
data.name = ""
return true
}
// some more stuff
}
Perhaps in the whole npm flow, name and version are checked somewhere else as well. But as stand-alone module, I think it'd be better to throw here as well.