src/ConfigurationNormalizer.js
/**
 * Constructor function for Configurationormalizer.
 *
 * @constructor
 * @classdesc This class is responsible to check and normalize a configuration object.
 *
 * @param {Object=} config The loaded configuration object. If `undefined` or `null` is passed `{}` is used.
 * @param {string=} basePath The path against each relative path of the configuration is resolved.
 * @param {VariableManager=} variableManager An optional object that contains all variables and their values that can
 *        be used in the configuration file.
 * @param {boolean=} useAbsolutePaths If set to true, all paths are transformed to absolute paths in the configuration
 *        file.
 * @throws {Error} Thrown if `config` is not `undefined`, `null` or an object.
 */
Constructor function for Configurationormalizer.
@constructor
@classdesc This class is responsible to check and normalize a configuration object.

@param {Object=} config The loaded configuration object.
Constructor function for Configurationormalizer . @constructor @classdesc This class is responsible to check and normalize a configuration object . @param { Object = } config The loaded configuration object .
function ConfigurationNormalizer (config, basePath, variableManager, useAbsolutePaths) {
    if (config === undefined || config === null || util.isObject(config)) {
        this._config = config || {};
    } else {
        throw new Error('"config" must be of the type object|null|undefined but is ' + config + '!');
    }
    if (variableManager && !(variableManager instanceof
                              (VariableManager))) {
        throw new Error('"variableManager" must be of the type object|null|undefined!');
    }
    this._variableParser = new VariableParser(
        variableManager || new (VariableManager)());
    this._useAbsolutePaths = useAbsolutePaths;
    if (!util.isBoolean(this._useAbsolutePaths)) this._useAbsolutePaths = false;
    if (basePath == null) this._basePath = process.cwd();
    else this._basePath = basePath;
}
function ConfigurationNormalizer ( config , basePath , variableManager , useAbsolutePaths ) { if ( config === undefined || config === null || util . isObject ( config ) ) { this . _config = config || { } ; } else { throw new Error ( '"config" must be of the type object|null|undefined but is ' + config + '!' ) ; } if ( variableManager && ! ( variableManager instanceof ( VariableManager ) ) ) { throw new Error ( '"variableManager" must be of the type object|null|undefined!' ) ; } this . _variableParser = new VariableParser ( variableManager || new ( VariableManager ) ( ) ) ; this . _useAbsolutePaths = useAbsolutePaths ; if ( ! util . isBoolean ( this . _useAbsolutePaths ) ) this . _useAbsolutePaths = false ; if ( basePath == null ) this . _basePath = process . cwd ( ) ; else this . _basePath = basePath ; }
Constructor function for Configurationormalizer.
Constructor function for Configurationormalizer .
/** @type {function(new:VariableManager, VariableManager=)} */ /** @type {function(new:VariableManager, VariableManager=)} */