Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection []Version
Collection is a type that implements the sort.Interface interface so that versions can be sorted.
func (Collection) Len ¶
func (v Collection) Len() int
func (Collection) Less ¶
func (v Collection) Less(i, j int) bool
func (Collection) Swap ¶
func (v Collection) Swap(i, j int)
type Constraints ¶
type Constraints [][]constraint
Constraints is one or more constraint that a npm version can be checked against.
func NewConstraints ¶
func NewConstraints(v string) (Constraints, error)
NewConstraints parses the given string and returns an instance of Constraints
func (Constraints) Check ¶
func (cs Constraints) Check(v Version) bool
Check tests if a version satisfies all the constraints.
func (Constraints) String ¶
func (cs Constraints) String() string
Returns the string format of the constraints
Click to show internal directories.
Click to hide internal directories.