Constructor
new Gang(paramsopt)
- Description:
Create a Gang.
- Source:
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
members |
Array.<Character> | The members of the gang. |
|
kind |
String | The kind or type of the gang. |
|
name |
String |
<optional> |
The name of the gang. |
Example
const gang = new Gang({
name: 'Oakley Boys',
kind: 'Cowboy Posse',
members: [pa, littleJohn, billy]
});
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
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
ammoormedia, will return the specific tag for this item, such asammo:22ormedia:35mm.
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
prefix |
String | the prefix to match |
Returns:
the first tag found that matches this prefix
- Type
- String