index.js
function exportVis(url, dest, callback) {
    if (dest === undefined) dest = '.';

    (0, _mkdirp2['default'])(dest, function (err) {
        if (err && callback) return callback(err);
        if (!isVisUrl(url)) {
            url = getVisUrl(url);
        }
        getVisJson(url, _path2['default'].join(dest, 'viz.json'), function (err, visJson) {
            downloadVisualizationData(visJson, dest, callback);
        });
    });
}
function exportVis(url, dest, callback) {
    if (dest === undefined) dest = '.';

    (0, _mkdirp2['default'])(dest, function (err) {
        if (err && callback) return callback(err);
        if (!isVisUrl(url)) {
            url = getVisUrl(url);
        }
        getVisJson(url, _path2['default'].join(dest, 'viz.json'), function (err, visJson) {
            downloadVisualizationData(visJson, dest, callback);
        });
    });
}
function exportVis ( url , dest , callback ) { if ( dest === undefined ) dest = '.' ; ( 0 , _mkdirp2 [ 'default' ] ) ( dest , function ( err ) { if ( err && callback ) return callback ( err ) ; if ( ! isVisUrl ( url ) ) { url = getVisUrl ( url ) ; } getVisJson ( url , _path2 [ 'default' ] . join ( dest , 'viz.json' ) , function ( err , visJson ) { downloadVisualizationData ( visJson , dest , callback ) ; } ) ; } ) ; }
Export a visualization at the given url.

@param {String} url the visualization's url
@param {String} dest the directory to export the visualization into

@example
exportVis('https://eric.cartodb.com/api/v2/viz/85c59718-082c-11e3-86d3-5404a6a69006/viz.json', 'my_vis');
Export a visualization at the given url .