Constructor
new Aggregation(keyword, …init)
Class constructor.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
keyword |
string | The aggregated JSON Schema keyword. |
|
init |
any |
<repeatable> |
The initial values to aggregate. |
Methods
add(e)
Adds a value to the aggregation, or joins the content of another
Aggregation
object.
Parameters:
Name | Type | Description |
---|---|---|
e |
any | The value/aggregation to be added/joined. |
resolve() → {any}
Generates an aggregated value following the specific rules associated to the keyword.
- Source:
- To Do:
-
- Implement specific logic for every keyword.
Returns:
The value resulted of applying the aggregation rules to the different contained values.
- Type
- any