export class Collection { data; constructor(){ this.data = {}; } get data(){ return this.data } get single(){ let singles = {}; for(const item of Object.keys(this.data)){ if(typeof item !== "object"){ singles[item] = this.data[item]; } } return singles; } add(key, value){ this.data[key] = value; } }