This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## https://gist.github.com/eminence/85961d47244a140fde89314837d0db0a | |
set -e | |
PWD=`pwd` | |
DD=$PWD/downloads/ # Download Directory | |
function download { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lodash = require('lodash'), | |
superagent = require('superagent'), | |
Promise = require('es6-promise').Promise | |
Store.prototype.get = function(url) { | |
if (lodash.isArray(url)) { | |
return Promise.all(lodash.map(url, this.get)) | |
} else if (lodash.isObject(url)) { | |
return Promise.all(lodash.map(url, function(url, key) { | |
return this.get(url).then(function(value) { |