mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
19 lines
536 B
Go
19 lines
536 B
Go
/*
|
|
Package javascript provides a concrete Cataloger implementation for JavaScript ecosystem files (yarn and npm).
|
|
*/
|
|
package javascript
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/cataloger/common"
|
|
)
|
|
|
|
// NewJavascriptCataloger returns a new JavaScript cataloger object.
|
|
func NewJavascriptCataloger() *common.GenericCataloger {
|
|
globParsers := map[string]common.ParserFn{
|
|
"**/package-lock.json": parsePackageLock,
|
|
"**/yarn.lock": parseYarnLock,
|
|
}
|
|
|
|
return common.NewGenericCataloger(nil, globParsers, "javascript-cataloger")
|
|
}
|