Descriptor
Hierarchy
- Ident
- Descriptor
Index
Properties
Properties
descriptorHash
Unique hash of a package descriptor. Used as key in various places, so that two descriptors can be quickly compared.
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 of the package (eg. node
).
range
The range associated with this descriptor. (eg. ^1.0.0
)
scope
Scope of the package, without the @
prefix (eg. types
).
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, orstringifyDescriptor
to generate a string representation of it.