Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 134 additions & 112 deletions dist/sharinpix.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ return /******/ (function(modules) { // webpackBootstrap
return this.get("/albums/" + album_id, claims).then(function (album) {
var key, ref, request, value;
request = superagent.post(album.upload_form.url);
ref = album.upload_form.params;
for (key in ref) {
value = ref[key];
request.field(key, value);
if (metadatas !== {}) {
ref = album.upload_form.params;
for (key in ref) {
value = ref[key];
request.field(key, value);
}
}
if (typeof File !== "undefined" && File !== null && image instanceof File) {
request.field('file', image);
Expand Down Expand Up @@ -6135,6 +6137,59 @@ return /******/ (function(modules) { // webpackBootstrap
return newArr;
}

/**
* Creates a continuation function with some arguments already applied.
*
* Useful as a shorthand when combined with other control flow functions. Any
* arguments passed to the returned function are added to the arguments
* originally passed to apply.
*
* @name apply
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {Function} fn - The function you want to eventually apply all
* arguments to. Invokes with (arguments...).
* @param {...*} arguments... - Any number of arguments to automatically apply
* when the continuation is called.
* @returns {Function} the partially-applied function
* @example
*
* // using apply
* async.parallel([
* async.apply(fs.writeFile, 'testfile1', 'test1'),
* async.apply(fs.writeFile, 'testfile2', 'test2')
* ]);
*
*
* // the same process without using apply
* async.parallel([
* function(callback) {
* fs.writeFile('testfile1', 'test1', callback);
* },
* function(callback) {
* fs.writeFile('testfile2', 'test2', callback);
* }
* ]);
*
* // It's possible to pass any number of additional arguments when calling the
* // continuation:
*
* node> var fn = async.apply(sys.puts, 'one');
* node> fn('two', 'three');
* one
* two
* three
*/
var apply = function(fn/*, ...args*/) {
var args = slice(arguments, 1);
return function(/*callArgs*/) {
var callArgs = slice(arguments);
return fn.apply(null, args.concat(callArgs));
};
};

var initialParams = function (fn) {
return function (/*...args, callback*/) {
var args = slice(arguments);
Expand Down Expand Up @@ -6412,8 +6467,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
value = Object(value);
return (symToStringTag && symToStringTag in value)
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
Expand Down Expand Up @@ -6822,7 +6876,7 @@ return /******/ (function(modules) { // webpackBootstrap
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
return freeProcess && freeProcess.binding('util');
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());

Expand Down Expand Up @@ -7337,59 +7391,6 @@ return /******/ (function(modules) { // webpackBootstrap
*/
var applyEachSeries = applyEach$1(mapSeries);

/**
* Creates a continuation function with some arguments already applied.
*
* Useful as a shorthand when combined with other control flow functions. Any
* arguments passed to the returned function are added to the arguments
* originally passed to apply.
*
* @name apply
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {Function} fn - The function you want to eventually apply all
* arguments to. Invokes with (arguments...).
* @param {...*} arguments... - Any number of arguments to automatically apply
* when the continuation is called.
* @returns {Function} the partially-applied function
* @example
*
* // using apply
* async.parallel([
* async.apply(fs.writeFile, 'testfile1', 'test1'),
* async.apply(fs.writeFile, 'testfile2', 'test2')
* ]);
*
*
* // the same process without using apply
* async.parallel([
* function(callback) {
* fs.writeFile('testfile1', 'test1', callback);
* },
* function(callback) {
* fs.writeFile('testfile2', 'test2', callback);
* }
* ]);
*
* // It's possible to pass any number of additional arguments when calling the
* // continuation:
*
* node> var fn = async.apply(sys.puts, 'one');
* node> fn('two', 'three');
* one
* two
* three
*/
var apply = function(fn/*, ...args*/) {
var args = slice(arguments, 1);
return function(/*callArgs*/) {
var callArgs = slice(arguments);
return fn.apply(null, args.concat(callArgs));
};
};

/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
Expand Down Expand Up @@ -7944,15 +7945,17 @@ return /******/ (function(modules) { // webpackBootstrap

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23';
var rsComboSymbolsRange = '\\u20d0-\\u20f0';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');

/**
* Checks if `string` contains Unicode symbols.
Expand All @@ -7967,13 +7970,15 @@ return /******/ (function(modules) { // webpackBootstrap

/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f\\ufe20-\\ufe23';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20f0';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboMarksRange$1 + rsComboSymbolsRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
Expand Down Expand Up @@ -8320,6 +8325,7 @@ return /******/ (function(modules) { // webpackBootstrap
var numRunning = 0;
var workersList = [];

var processingScheduled = false;
function _insert(data, insertAtFront, callback) {
if (callback != null && typeof callback !== 'function') {
throw new Error('task callback must be a function');
Expand Down Expand Up @@ -8347,7 +8353,14 @@ return /******/ (function(modules) { // webpackBootstrap
q._tasks.push(item);
}
}
setImmediate$1(q.process);

if (!processingScheduled) {
processingScheduled = true;
setImmediate$1(function() {
processingScheduled = false;
q.process();
});
}
}

function _next(tasks) {
Expand All @@ -8358,7 +8371,9 @@ return /******/ (function(modules) { // webpackBootstrap
var task = tasks[i];

var index = baseIndexOf(workersList, task, 0);
if (index >= 0) {
if (index === 0) {
workersList.shift();
} else if (index > 0) {
workersList.splice(index, 1);
}

Expand Down Expand Up @@ -9925,7 +9940,7 @@ return /******/ (function(modules) { // webpackBootstrap

/**
* Calls `callback` on a later loop around the event loop. In Node.js this just
* calls `setImmediate`. In the browser it will use `setImmediate` if
* calls `process.nextTicl`. In the browser it will use `setImmediate` if
* available, otherwise `setTimeout(callback, 0)`, which means other higher
* priority events may precede the execution of `callback`.
*
Expand All @@ -9935,7 +9950,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @static
* @memberOf module:Utils
* @method
* @alias setImmediate
* @see [async.setImmediate]{@link module:Utils.setImmediate}
* @category Util
* @param {Function} callback - The function to call on a later loop around
* the event loop. Invoked with (args...).
Expand Down Expand Up @@ -10395,43 +10410,6 @@ return /******/ (function(modules) { // webpackBootstrap
});
}

function reject$1(eachfn, arr, iteratee, callback) {
_filter(eachfn, arr, function(value, cb) {
iteratee(value, function(err, v) {
cb(err, !v);
});
}, callback);
}

/**
* The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
*
* @name reject
* @static
* @memberOf module:Collections
* @method
* @see [async.filter]{@link module:Collections.filter}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @example
*
* async.reject(['file1','file2','file3'], function(filePath, callback) {
* fs.access(filePath, function(err) {
* callback(null, !err)
* });
* }, function(err, results) {
* // results now equals an array of missing files
* createFiles(results);
* });
*/
var reject = doParallel(reject$1);

/**
* A helper function that wraps an array or an object of functions with `reflect`.
*
Expand Down Expand Up @@ -10512,6 +10490,43 @@ return /******/ (function(modules) { // webpackBootstrap
return results;
}

function reject$1(eachfn, arr, iteratee, callback) {
_filter(eachfn, arr, function(value, cb) {
iteratee(value, function(err, v) {
cb(err, !v);
});
}, callback);
}

/**
* The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
*
* @name reject
* @static
* @memberOf module:Collections
* @method
* @see [async.filter]{@link module:Collections.filter}
* @category Collection
* @param {Array|Iterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @example
*
* async.reject(['file1','file2','file3'], function(filePath, callback) {
* fs.access(filePath, function(err) {
* callback(null, !err)
* });
* }, function(err, results) {
* // results now equals an array of missing files
* createFiles(results);
* });
*/
var reject = doParallel(reject$1);

/**
* The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
* time.
Expand Down Expand Up @@ -10651,8 +10666,8 @@ return /******/ (function(modules) { // webpackBootstrap
* // do something with the result
* });
*
* // It can also be embedded within other control flow functions to retry
* // individual methods that are not as reliable, like this:
* // to retry individual methods that are not as reliable within other
* // control flow functions, use the `retryable` wrapper:
* async.auto({
* users: api.getUsers.bind(api),
* payments: async.retryable(3, api.getPayments.bind(api))
Expand Down Expand Up @@ -11219,7 +11234,7 @@ return /******/ (function(modules) { // webpackBootstrap
* `result` arguments of the last attempt at completing the `task`. Invoked with
* (err, results).
* @example
* async.try([
* async.tryEach([
* function getDataFromFirstWebsite(callback) {
* // Try getting the data from the first website
* callback(err, data);
Expand Down Expand Up @@ -11494,9 +11509,9 @@ return /******/ (function(modules) { // webpackBootstrap
*/

var index = {
apply: apply,
applyEach: applyEach,
applyEachSeries: applyEachSeries,
apply: apply,
asyncify: asyncify,
auto: auto,
autoInject: autoInject,
Expand Down Expand Up @@ -11574,7 +11589,14 @@ return /******/ (function(modules) { // webpackBootstrap

// aliases
all: every,
allLimit: everyLimit,
allSeries: everySeries,
any: some,
anyLimit: someLimit,
anySeries: someSeries,
find: detect,
findLimit: detectLimit,
findSeries: detectSeries,
forEach: eachLimit,
forEachSeries: eachSeries,
forEachLimit: eachLimit$1,
Expand All @@ -11591,9 +11613,9 @@ return /******/ (function(modules) { // webpackBootstrap
};

exports['default'] = index;
exports.apply = apply;
exports.applyEach = applyEach;
exports.applyEachSeries = applyEachSeries;
exports.apply = apply;
exports.asyncify = asyncify;
exports.auto = auto;
exports.autoInject = autoInject;
Expand Down
Loading