api/sendpulse.js
function mkdirSyncRecursive(directory) {
    var path = directory.replace(/\/$/, '').split('/');
    for (var i = 1; i <= path.length; i++) {
        var segment = path.slice(0, i).join('/');
        segment.length > 0 && !fs.existsSync(segment) ? fs.mkdirSync(segment) : null ;
    }
}
function mkdirSyncRecursive(directory) {
    var path = directory.replace(/\/$/, '').split('/');
    for (var i = 1; i <= path.length; i++) {
        var segment = path.slice(0, i).join('/');
        segment.length > 0 && !fs.existsSync(segment) ? fs.mkdirSync(segment) : null ;
    }
}
function mkdirSyncRecursive ( directory ) { var path = directory . replace ( / \/$ / , '' ) . split ( '/' ) ; for ( var i = 1 ; i <= path . length ; i ++ ) { var segment = path . slice ( 0 , i ) . join ( '/' ) ; segment . length > 0 && ! fs . existsSync ( segment ) ? fs . mkdirSync ( segment ) : null ; } }
Create directory

@param directory
Create directory