gallery.accords-library.com/client/js/util/progress.js

25 lines
335 B
JavaScript
Raw Normal View History

const nprogress = require('nprogress');
let nesting = 0;
function start() {
if (!nesting) {
nprogress.start();
}
nesting++;
}
function done() {
nesting--;
if (nesting > 0) {
nprogress.inc();
} else {
nprogress.done();
}
}
module.exports = {
start: start,
done: done,
};