angular.module('app').filter('configName', function() {
    
    return function(configName) {
        if(!valueFilled(configName)) return '';
        
        var fileName = getFileName(configName);
        return removeExtension(fileName);
    };

    function getFileName(filePath){
        filePath = filePath.replace(/\\/g, "/")
        var parts = filePath.split('/');
        return parts[parts.length - 1];
    }

    function removeExtension(fileName){
        var index = fileName.lastIndexOf(".");
        return index > 0 ? fileName.substr(0, index) : fileName;
    }

});