pub fn is_valid_package_name(name: &str) -> boolExpand description
Check if a string looks like a valid npm package name.
Rejects strings that are clearly not packages: shell variables ($X),
pure numbers, strings starting with !, empty strings, etc.
This prevents false “unlisted dependency” reports for test fixture
artifacts like $DIR or 1.