<commit_before>ngapp.directive('apiItems', function() {
    return {
        restrict: 'E',
        scope: {
            api: '@',
            namespace: '@'
        },
        templateUrl: 'directives/apiItems.html',
        controller: 'apiItemsController'
    }
});

ngapp.controller('apiItemsController', function($scope) {
    let path = `docs/development/apis/${$scope.api}/${$scope.namespace}.json`;
    $scope.items = fh.loadJsonFile(path);
});<commit_msg>fixed api items loading<commit_after>ngapp.directive('apiItems', function() {
    return {
        restrict: 'E',
        scope: {
            api: '@',
            namespace: '@'
        },
        templateUrl: 'directives/apiItems.html',
        controller: 'apiItemsController'
    }
});

ngapp.controller('apiItemsController', function($scope) {
    let basePath = 'app/docs/development/apis',
        path = `${basePath}/${$scope.api}/${$scope.namespace}.json`,
        items = fh.loadJsonFile(path);
    items.forEach(function(item) {
        if (!item.type) item.type = 'function';
    });
    $scope.items = items;
});
{'fraction_non_alphanumeric': 0.17155963302752295, 'fraction_numerical': 0.0, 'mean_word_length': 2.6125827814569536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5202063', 'n_tokens_mistral': 330, 'n_tokens_neox': 331, 'n_words': 50}