async load(){
        this.contents = await this.loadFile(this.dir + this.path, true);

        if(!this.validator.nonEmptyArrayOfObjects(this.contents)){
            throw new TypeError(this.dir + this.path + ' contains invalid data');
        }

        let props = {'name':'isHtmlSafe', 'path':'isFilePath', 'replacementsPath':'isFilePath', 'template':'boolean'};
        for (var i = 0; i < this.contents.length; i++){
            if(!this.validator.objectwithPropertiesOfType(this.contents[i], props)){
                let msg = 'mcu [' + i + '] in ' + this.dir + this.path;
                msg += ' is missing or has invalid properties'; 
                throw new TypeError(msg);
            }
        }        
    }
/**
     * The method loads the json mcu list.
     */
The method loads the json mcu list.
The method loads the json mcu list .
async load(){
        this.contents = await this.loadFile(this.dir + this.path, true);
        if(!this.validator.nonEmptyArrayOfObjects(this.contents)){
            throw new TypeError(this.dir + this.path + ' contains invalid data');
        }
        let props = {'name':'isHtmlSafe', 'path':'isFilePath', 'replacementsPath':'isFilePath', 'template':'boolean'};
        for (var i = 0; i < this.contents.length; i++){
            if(!this.validator.objectwithPropertiesOfType(this.contents[i], props)){
                let msg = 'mcu [' + i + '] in ' + this.dir + this.path;
                msg += ' is missing or has invalid properties'; 
                throw new TypeError(msg);
            }
        }        
    }
async load ( ) { this . contents = await this . loadFile ( this . dir + this . path , true ) ; if ( ! this . validator . nonEmptyArrayOfObjects ( this . contents ) ) { throw new TypeError ( this . dir + this . path + ' contains invalid data' ) ; } let props = { 'name' : 'isHtmlSafe' , 'path' : 'isFilePath' , 'replacementsPath' : 'isFilePath' , 'template' : 'boolean' } ; for ( var i = 0 ; i < this . contents . length ; i ++ ) { if ( ! this . validator . objectwithPropertiesOfType ( this . contents [ i ] , props ) ) { let msg = 'mcu [' + i + '] in ' + this . dir + this . path ; msg += ' is missing or has invalid properties' ; throw new TypeError ( msg ) ; } } }
The method loads the json mcu list.
The method loads the json mcu list .