Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
Something went wrong. Try again.
961 B · 43 lines
TypeScript
1234567891011121314151617181920212223242526272829303132333435363738394041424344/** * Shamelessly stolen from https://stackoverflow.com/a/43593634/1469797 * */class TupleMap<X,Y,Z> { private map = new Map<string, Z>();
set(key: [X, Y], value: Z): this { this.map.set(JSON.stringify(key), value); return this; }
get(key: [X, Y]): Z | undefined { return this.map.get(JSON.stringify(key)); }
clear() { this.map.clear(); }
delete(key: [X, Y]): boolean { return this.map.delete(JSON.stringify(key)); }
has(key: [X, Y]): boolean { return this.map.has(JSON.stringify(key)); }
get size() { return this.map.size; }
values() { return this.map.values(); }
forEach(callbackfn: (value: Z, key: [X, Y], map: Map<string, Z>) => void, thisArg?: any): void { this.map.forEach((value, key) => { callbackfn.call(thisArg, value, JSON.parse(key), this.map); }); }}
export default TupleMap