nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

44
node_modules/p-limit/index.js generated vendored
View File

@@ -1,7 +1,7 @@
'use strict';
const pTry = require('p-try');
module.exports = concurrency => {
const pLimit = concurrency => {
if (concurrency < 1) {
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
}
@@ -17,26 +17,36 @@ module.exports = concurrency => {
}
};
return fn => new Promise((resolve, reject) => {
const run = () => {
activeCount++;
const run = (fn, resolve, ...args) => {
activeCount++;
pTry(fn).then(
val => {
resolve(val);
next();
},
err => {
reject(err);
next();
}
);
};
const result = pTry(fn, ...args);
resolve(result);
result.then(next, next);
};
const enqueue = (fn, resolve, ...args) => {
if (activeCount < concurrency) {
run();
run(fn, resolve, ...args);
} else {
queue.push(run);
queue.push(run.bind(null, fn, resolve, ...args));
}
};
const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args));
Object.defineProperties(generator, {
activeCount: {
get: () => activeCount
},
pendingCount: {
get: () => queue.length
}
});
return generator;
};
module.exports = pLimit;
module.exports.default = pLimit;