Skip to content

Instantly share code, notes, and snippets.

@dmikis
Created August 6, 2012 13:57
Show Gist options
  • Save dmikis/3274609 to your computer and use it in GitHub Desktop.
Save dmikis/3274609 to your computer and use it in GitHub Desktop.
[
100000,
200000,
300000
]
// vs
[100000,
200000,
300000]
// i.e.
.map(function (file) {
return rowJSON(
[
'/actions/download-export.xml?regionId=',
regionId,
'&fileName',
encodeURIComponent(file)
].join(''),
file.split('.').slice(-1)[0]);
});
// vs
.map(function (file) {
return rowJSON(
['/actions/download-export.xml?regionId=',
regionId,
'&fileName',
encodeURIComponent(file)].join(''),
file.split('.').slice(-1)[0]);
});
@tarmolov
Copy link

tarmolov commented Aug 6, 2012

.map(function (file) {
    return rowJSON(
        [   
            '/actions/download-export.xml?regionId=' + jQuery.param({
                regionId: regionId,
                filename: file
            })  
        ]   
            .join(''),
        file
            .split('.')
            .slice(-1)[0]
    );                                                                                                                                                                            
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment