From ddee6d2b6a610d530df19a45345716940a85a97b Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Mon, 20 Jul 2020 20:07:57 -0700 Subject: [PATCH] Update config.js --- src/config.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/config.js b/src/config.js index fbbd2474d..ba06c2146 100644 --- a/src/config.js +++ b/src/config.js @@ -855,16 +855,15 @@ const siteConfig = assignWithDepth({}, defaultConfig); const currentConfig = assignWithDepth({}, defaultConfig); /** + *## setSiteConfig *| Function | Description | Type | Values | *| --------- | ------------------- | ------- | ------------------ | *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array| - ***Notes:** *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig *to the defaultConfig *Note: currentConfig is set in this function - **Default value: At default, will mirror Global Config** * @param conf - the base currentConfig to use as siteConfig * @returns {*} - the siteConfig @@ -877,10 +876,10 @@ export const setSiteConfig = conf => { return getSiteConfig(); }; /** + *## getSiteConfig *| Function | Description | Type | Values | *| --------- | ------------------- | ------- | ------------------ | *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig| - ***Notes**: *Returns **any** values in siteConfig. * @returns {*} @@ -889,11 +888,10 @@ export const getSiteConfig = () => { return assignWithDepth({}, siteConfig); }; /** + *## setConfig *| Function | Description | Type | Values | *| --------- | ------------------- | ------- | ------------------ | *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array| - - ***Notes**: *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any *values found in conf with key found in siteConfig.secure will be replaced with the corresponding @@ -908,10 +906,10 @@ export const setConfig = conf => { return getConfig(); }; /** + * ## getConfig *| Function | Description | Type | Return Values | *| --------- | ------------------- | ------- | ------------------ | *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig| - ***Notes**: *Returns **any** the currentConfig * @returns {*} - the currentConfig @@ -920,10 +918,10 @@ export const getConfig = () => { return assignWithDepth({}, currentConfig); }; /** + *## sanitize *| Function | Description | Type | Values | *| --------- | ------------------- | ------- | ------------------ | *| sanitize |Sets the siteConfig to desired values. | Put Request |None| - *Ensures options parameter does not attempt to override siteConfig secure keys *Note: modifies options in-place * @param options - the potential setConfig parameter @@ -942,6 +940,7 @@ export const sanitize = options => { }); }; /** + *## reset *| Function | Description | Type | Required | Values | *| --------- | ------------------- | ------- | -------- | ------------------ | *| reset|Resets currentConfig to conf| Put Request | Required | None|