Constructor
new Resource(definition)
Parameters:
Name | Type | Description |
---|---|---|
definition |
Object | Initial parameters |
- Source:
Methods
(async) create(obj) → {Vector}
Create an instance of the Resource's type.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Map of the instance's properties and values. |
- Source:
Returns:
Resulting Vector with deterministic identifier.
- Type
- Vector
(async) update(id, update) → {Vector}
Modify an existing instance of a Resource by its unique identifier. Produces a new instance.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | Unique ID to update. |
update |
Object | Map of change to make (keys -> values). |
- Source:
Returns:
Resulting Vector instance with updated identifier.
- Type
- Vector