mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 14:36:33 +01:00
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -206,3 +206,8 @@ func parsePackageJSON(_ string, reader io.Reader) ([]pkg.Package, error) {
|
||||
func (p PackageJSON) hasNameAndVersionValues() bool {
|
||||
return p.Name != "" && p.Version != ""
|
||||
}
|
||||
|
||||
func pathContainsNodeModulesDirectory(path string) bool {
|
||||
isNodeModulesPath, _ := regexp.MatchString("[\\/]node_modules[\\/]", path)
|
||||
return isNodeModulesPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user