How many sessions are owned by the given user.
(userId: string)
| 173 | |
| 174 | /** How many sessions are owned by the given user. */ |
| 175 | countByUser(userId: string): number { |
| 176 | let n = 0; |
| 177 | for (const s of this.sessions.values()) { |
| 178 | if (s.userId === userId) n++; |
| 179 | } |
| 180 | return n; |
| 181 | } |
| 182 | |
| 183 | /** Returns all raw StoredSession objects (used internally by SessionManager). */ |
| 184 | getAll(): StoredSession[] { |
no test coverage detected