tools

package
v0.0.19-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExtraPackageInfoNpm

func CreateExtraPackageInfoNpm(result types.Npm) map[string]any

CreateExtraPackageInfoNpm creates a map containing extra package information for an Npm package. It takes a result of type types.Npm as input and returns a map[string]any. The map contains the following key-value pairs: - "Author": The name of the package author. - "Dist_tags": The distribution tags of the package. - "Maintainers": The maintainers of the package.

func CreatePackageInfoNpm

func CreatePackageInfoNpm(result types.Npm) knowledge.Package

CreatePackageInfoNpm creates a types.Package object based on the provided types.Npm object. It populates the fields of the package object with the corresponding values from the npm object. If the repository field in the npm object is a string, it sets the source type to "string" and the source URL to the repository value. If the repository field in the npm object is a map, it extracts the source type and source URL from the map and sets them in the package object. Finally, it calls CreateExtraPackageInfoNpm to populate the extra field of the package object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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