npm

package
v0.0.0-...-9c274a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 9 Imported by: 0

README

NPM license analyzer

Will run for the local repository source given.

Detect

Checks if there is a package.json or yarn.lock in the repository, will mean detected if found any.

Analyze

Will call yarn licenses list --json --no-progress command which returns the list of dependencies with its license info.

The official definition for this command can be found here: https://yarnpkg.com/lang/en/docs/cli/licenses. Calling this command will install the dependencies used in the project automatically.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

func (*Analyzer) AnalyzeRepository

func (a *Analyzer) AnalyzeRepository() (analyzers.RepositoryLicenseInfos, error)

func (*Analyzer) Detect

func (a *Analyzer) Detect(repoURL, localSourcePath string) (bool, error)

func (Analyzer) String

func (a Analyzer) String() string

type Data

type Data struct {
	Head []string   `json:"head"`
	Body [][]string `json:"body"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL