UNPKG

dev-classes

Version:
30 lines (29 loc) 711 B
var h = Object.defineProperty; var n = (e, t, s) => t in e ? h(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; var l = (e, t, s) => (n(e, typeof t != "symbol" ? t + "" : t, s), s); class o { constructor() { l(this, "list", []); l(this, "setList", (t) => { const { list: s } = this; s.some(({ url: r }) => t.url === r) || this.list.push(t); }); } getList() { return this.list; } removeItem(t) { const s = this.list.filter((i) => i.url !== t); this.list = s; } getLength() { return this.list.length; } getIsItem(t) { const { list: s } = this; return s.some((i) => i.url === t); } } export { o as SaveRequest };