@11ty/eleventy-img
Version:
Low level utility to perform build-time image transformations.
28 lines (22 loc) • 391 B
JavaScript
class DeferCounter {
constructor() {
this.resetCount();
}
resetCount() {
this.deferCount = 0;
this.inputs = new Map();
}
getCount() {
return this.deferCount;
}
increment(input) {
if(input) {
if(this.inputs.has(input)) {
return;
}
this.inputs.set(input, true);
}
this.deferCount++;
}
}
module.exports = DeferCounter;