1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

Add reference counting for emote sets so that we know when to unload them. Create a class for Users so that we can use ref counting with them.

This commit is contained in:
SirStendec 2017-11-22 20:21:01 -05:00
parent b04cd8a61a
commit 6c4966166a
5 changed files with 256 additions and 29 deletions

View file

@ -186,6 +186,11 @@ export class SourcedSet {
get(key) { return this._sources && this._sources.get(key) }
has(key) { return this._sources ? this._sources.has(key) : false }
sourceIncludes(key, val) {
const src = this._sources && this._sources.get(key);
return src && src.includes(val);
}
includes(val) {
return this._cache.includes(val);
}