<commit_before>/**!
 * AngularJS Nested Resource
 * @author  Roy  <<EMAIL>>
 * @version 1.0.0
 */
(function() {
    var angularNested = angular.module('ngNestedResource', []);

    angularNested.factory('nestedResource', ['$resource', function($resource) {


        function buildStep(currentRoute, actions){

            var result = {};
            var nested = {};

            // Check if we have any nested objects in the resource
            // If we found any, remove them and save in a different object
            for(var key in actions){
                if(actions[key].nested || actions[key].route){
                    nested[key] = actions[key];
                    delete actions[key];
                }
            }

            // Create a new resource for the normal resource requests (resource API)
            var resource = $resource(currentRoute, {}, actions);

            // Add all methods from the resource to our result object
            for(var key in actions){
                result[key] = resource[key];
            }

            for(var key in nested){
                // For each nested object, create a new route from the config
                var futureRoute = currentRoute + (nested[key].route || "");
                // Create a resource object for that route, replace the '@'
                // symbol with a resource param placeholder, and pass the configurations
                // to the resource
                var nestedResource = $resource(futureRoute.replace("@", ":param"), {}, {
                    get: {method: nested[key].method, isArray: nested[key].isArray}<commit_msg>fixed nested resource<commit_after>/**!
 * AngularJS Nested Resource
 * @author  Roy  <<EMAIL>>
 * @version 1.0.0
 */
(function() {
    var angularNested = angular.module('ngNestedResource', []);

    angularNested.factory('nestedResource', ['$resource', function($resource) {


        function buildStep(currentRoute, actions){

            var result = {};
            var nested = {};

            // Check if we have any nested objects in the resource
            // If we found any, remove them and save in a different object
            for(var key in actions){
                if(actions[key].nested || actions[key].route){
                    nested[key] = actions[key];
                    delete actions[key];
                }
            }

            // Create a new resource for the normal resource requests (resource API)
            var resource = $resource(currentRoute, {}, actions);

            // Add all methods from the resource to our result object
            for(var key in actions){
                result[key] = resource[key];
            }

            for(var key in nested){
                // For each nested object, create a new route from the config
                var futureRoute = currentRoute + (nested[key].route || "");
                // Create a resource object for that route, replace the '@'
                // symbol with a resource param placeholder, and pass the configurations
                // to the resource
                var nestedResource = $resource(futureRoute.replace("@", ":param"), {}, {
                    get: {method: nested[key].method, params: {param: "@param"}, isArray: nested[key].isArray}
{'fraction_non_alphanumeric': 0.10830544569516276, 'fraction_numerical': 0.0018253726802555522, 'mean_word_length': 1.8344827586206895, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '220515', 'n_tokens_mistral': 791, 'n_tokens_neox': 749, 'n_words': 276}