lib/node-highcharts-exporter/main.js
function(hcExportRequest,asyncCallback){

    var makeThisExportDir = function(mkExportDirErr){
        var thisExportDir = [config.processingDir, crypto.createHash('md5').update(Date().toString()+hcExportRequest.svg).digest('hex'),''].join('/');
        fs.mkdir(thisExportDir, function(error){
            asyncCallback(mkExportDirErr, thisExportDir, hcExportRequest);
        });
    };

    if(fs.existsSync(config.processingDir)){
        makeThisExportDir(null);
    }
    else{
        fs.mkdir(config.processingDir, function(error){
            makeThisExportDir(error);
        });
    }
}
function(hcExportRequest,asyncCallback){

    var makeThisExportDir = function(mkExportDirErr){
        var thisExportDir = [config.processingDir, crypto.createHash('md5').update(Date().toString()+hcExportRequest.svg).digest('hex'),''].join('/');
        fs.mkdir(thisExportDir, function(error){
            asyncCallback(mkExportDirErr, thisExportDir, hcExportRequest);
        });
    };

    if(fs.existsSync(config.processingDir)){
        makeThisExportDir(null);
    }
    else{
        fs.mkdir(config.processingDir, function(error){
            makeThisExportDir(error);
        });
    }
}
function ( hcExportRequest , asyncCallback ) { var makeThisExportDir = function ( mkExportDirErr ) { var thisExportDir = [ config . processingDir , crypto . createHash ( 'md5' ) . update ( Date ( ) . toString ( ) + hcExportRequest . svg ) . digest ( 'hex' ) , '' ] . join ( '/' ) ; fs . mkdir ( thisExportDir , function ( error ) { asyncCallback ( mkExportDirErr , thisExportDir , hcExportRequest ) ; } ) ; } ; if ( fs . existsSync ( config . processingDir ) ) { makeThisExportDir ( null ) ; } else { fs . mkdir ( config . processingDir , function ( error ) { makeThisExportDir ( error ) ; } ) ; } }
Makes the directory to process and store the requested chart
@param  {object} hcExportRequest The Highcharts POSTed export request object
@param  {function} asyncCallback A reference to the async callback
@return {void}                   Nothing
Makes the directory to process and store the requested chart