Constructor
new Profession(params)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
params |
Object |
Extends
Members
tags
- Description:
An array of string tags that characterize this item.
- Source:
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
tags |
Set |
An array of string tags that characterize this item.
Methods
asJSON() → {String}
- Description:
Converts the model to JSON, converting sets to arrays.
- Source:
- Overrides:
Returns:
JSON
- Type
- String
has(tag) → {boolean}
- Description:
Does this model have the given tag?
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tag |
String |
Returns:
true if it does, false otherwise
- Type
- boolean
is(tag) → {boolean}
- Description:
Does this model have the given tag?
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tag |
String |
Returns:
true if it does, false otherwise
- Type
- boolean
not(tag) → {boolean}
- Description:
Does this model not have the given tag?
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tag |
String |
Returns:
true if it does not have the tag, false otherwise
- Type
- boolean
typeOf(prefix) → {String}
- Description:
Given a prefix like
ammo
ormedia
, will return the specific tag for this item, such asammo:22
ormedia:35mm
.
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
prefix |
String | the prefix to match |
Returns:
the first tag found that matches this prefix
- Type
- String