Contains the singleton data structure definition that allows the entire application, to share data between various components of the framework and greater application platform.
- Copyright:
- Copyright © 2022-… by Seth Hollingsead. All rights reserved
- Source:
Requires
Methods
(inner) getData() → {object}
returns the contents of the data structure. Can be used to stash data, before it is reassigned, for the purpose of setting up a unit test scenario with mocked data.
- Source:
Returns:
A JSON object that contains all of the data that is currently stored in the data structure.
- Type
- object
(inner) setData(newData)
Clears the data and sets it to some new specified data. Can be used to setup mock data, or create a clone of Haystacks for the purposes of executing a callback on Haystacks such as loading more data for a plugin.
Parameters:
| Name | Type | Description |
|---|---|---|
newData |
object | The new data that should replace any data already stored on the data structure. |
- Source: