assassin-bug/framework/asset-manager/queue.js

20 lines
396 B
JavaScript
Raw Permalink Normal View History

2022-11-26 01:22:02 +00:00
export class Queue {
constructor() {
this.items = [];
}
add(file) {
this.items.push(file);
return this.items;
}
remove(file) {
this.items = this.items.filter((item) => item !== file);
return this.items;
}
pop() {
return this.items.pop();
}
length() {
return this.items.length;
}
}