{"size": 1352, "ext": "js", "max_stars_repo_path": "app/site/js/queue.js", "max_stars_repo_name": "roncli/HyperdriveToolkit", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/site/js/queue.js", "max_issues_repo_name": "roncli/HyperdriveToolkit", "max_issues_repo_issues_event_min_datetime": "2018-12-06T06:36:36.000Z", "max_issues_repo_issues_event_max_datetime": "2019-01-09T01:01:21.000Z", "max_forks_repo_path": "app/site/js/queue.js", "max_forks_repo_name": "roncli/HyperdriveToolkit", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 32.1904761905, "max_line_length": 76, "alphanum_fraction": 0.1331360947}
//   ###                              
//  #   #                             
//  #   #  #   #   ###   #   #   ###  
//  #   #  #   #  #   #  #   #  #   # 
//  #   #  #   #  #####  #   #  ##### 
//  # # #  #  ##  #      #  ##  #     
//   ###    ## #   ###    ## #   ###  
//      #                             
/**
 * A class that creates a queue of functions.
 */
class Queue {
    //                           #                       #                
    //                           #                       #                
    //  ##    ##   ###    ###   ###   ###   #  #   ##   ###    ##   ###   
    // #     #  #  #  #  ##      #    #  #  #  #  #      #    #  #  #  #  
    // #     #  #  #  #    ##    #    #     #  #  #      #    #  #  #     
    //  ##    ##   #  #  ###      ##  #      ###   ##     ##   ##   #     
    /**
     * Creates a new queue.
     */
    constructor() {
        this.promise = Promise.resolve();
    }

    //                    #     
    //                    #     
    // ###   #  #   ###   ###   
    // #  #  #  #  ##     #  #  
    // #  #  #  #    ##   #  #  
    // ###    ###  ###    #  #  
    // #                        
    /**
     * Adds a function to the queue.
     */
    push(fx) {
        this.promise = this.promise.then(() => {}).catch(() => {}).then(fx);
    }
}

module.exports = Queue;
