dojox/app/utils/config (version 1.10)

Summary

This module contains the config

Method Summary

  • configMerge(target,source) does a deep copy of the source into the target to merge the config from the source into the target
  • configProcessHas(source) scan the source config for has checks and call configMerge to merge has sections, and remove the has sections from the source.

Methods

configMerge(target,source)

does a deep copy of the source into the target to merge the config from the source into the target

configMerge will merge the source config into the target config with a deep copy. anything starting with __ will be skipped and if the target is an array the source items will be pushed into the target.

Parameter Type Description
target Object

an object representing the config which will be updated by merging in the source.

source Object

an object representing the config to be merged into the target.

Returns:any | Object

the updated target object.

configProcessHas(source)

scan the source config for has checks and call configMerge to merge has sections, and remove the has sections from the source.

configProcessHas will scan the source config for has checks. For each has section the items inside the has section will be tested with has (sniff) If the has test is true it will call configMerge to merge has sections back into the source config. It will always remove the has section from the source after processing it. The names in the has section can be separated by a comma, indicating that any of those being true will satisfy the test.

Parameter Type Description
source Object

an object representing the config to be processed.

Returns:any | Object

the updated source object.

Error in the documentation? Can’t find what you are looking for? Let us know!