new Version(definition)
Defines a Version.
Parameters:
Name | Type | Description |
---|---|---|
definition |
Version.definition |
- Source:
Extends
Members
build :String
Type:
- String
- Source:
major :String
Type:
- String
- Source:
minor :String
Type:
- String
- Source:
patch :String
Type:
- String
- Source:
prerelease :String
Type:
- String
- Source:
raw :String
The raw URL string. If Version#set is called with a string parameter, the string is saved here before parsing various Version components.
Type:
- String
- Source:
string :String
Type:
- String
- Source:
Methods
findInParents(property, customizeropt) → {*|undefined}
Tries to find the given property locally, and then proceeds to lookup in each parent,
going up the chain as necessary. Lookup will continue until customizer
returns a truthy value. If used
without a customizer, the lookup will stop at the first parent that contains the property.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
property |
String | ||
customizer |
function |
<optional> |
- Inherited From:
- Source:
Returns:
- Type
- * | undefined
forEachParent(options, iterator)
Invokes the given iterator for every parent in the parent chain of the given element.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | A set of options for the parent chain traversal. Properties
|
||||||||||
iterator |
function | The function to call for every parent in the ancestry chain. |
- Inherited From:
- Source:
- To Do:
-
- Cache the results
meta() → {*}
Returns the meta keys associated with the property
- Inherited From:
- Source:
Returns:
- Type
- *
parent() → {*|undefined}
Returns the parent of item
- Inherited From:
- Source:
Returns:
- Type
- * | undefined
set(value)
Set the version value as string or object with separate components of version
Parameters:
Name | Type | Description |
---|---|---|
value |
object | string |
- Source:
toJSON()
Returns the JSON representation of a property, which conforms to the way it is defined in a collection. You can use this method to get the instantaneous representation of any property, including a Collection.
- Inherited From:
- Source:
Type Definitions
definition
Type:
- Object | String
- Source: