Skip to main content

Descriptor

Descriptors are just like idents (including their identHash), except that they also contain a range and an additional comparator hash.

Use parseRange to turn a descriptor string into this data structure, makeDescriptor to create a new one from an ident and a range, or stringifyDescriptor to generate a string representation of it.

Hierarchy

Index

Properties

descriptorHash

descriptorHash: DescriptorHash

Unique hash of a package descriptor. Used as key in various places, so that two descriptors can be quickly compared.

identHash

identHash: IdentHash

Unique hash of a package scope and name. Used as key in various places, so that two idents can be quickly compared.

name

name: string

Name of the package (eg. node).

range

range: string

The range associated with this descriptor. (eg. ^1.0.0)

scope

scope: null | string

Scope of the package, without the @ prefix (eg. types).