INNER CODE UNIT · JavaScript
Profile
jonasstrehle/supercookie · server/main.js:137
class Profile {
constructor(uid, identifier = null) {
this._identifier = null;
this._visitedRoutes = new Set();
this._storageSize = -1;
this._uid = uid;
if (identifier !== null)
this._identifier = identifier,
this._vector = Webserver.getVector(identifier);
Profile.list.add(this);
}
static get(uid) {
return this.has(uid) ?
Array.from(this.list).filter((profile) => profile.uid === uid)?.pop() :
null;
}
static has(uid) {
return Array.from(this.list).some((profile) => profile.uid === uid);