beyond
Version:
The Full Stack Universal Typescript Framework
37 lines (30 loc) • 997 B
JavaScript
module.exports = class extends Map {
get ready() {
return this.
}
const promises = [];
// Remove duplicated ids
let ids = this.
ids = ids.filter((e, i) => ids.indexOf(e) === i);
for (let id of ids) {
if (!(ids instanceof Array)) id = this.
const item = new this.
this.set(id, item);
promises.push(item.ready);
}
await Promise.all(promises);
this.
};
constructor(Item, ids, parentIdentifier) {
super();
this.
this.
this.
this.
}
}