T2 Config utilities
getConfig()
Returns a property from the t2.json config file.
Example
const HAS_ICON = getConfig(['t2/statistics', 'features', 'hasIcon'], false);
Available arguments
Argument | Type | Description |
---|---|---|
key | string | string[] | The object key you want to fetch, or the path to the property |
fallback | any | Default value if the property is undefined |
getConfigAll();
Returns the whole t2.json
config object.