* Puts a key-value pair to the session data store * * @param key - The key to store the value under * @param value - The value to store * * @example * session.put('username', 'john') * session.put('user.preferences', { theme: 'dark' })
(key: string, value: AllowedSessionValues)
| 283 | * session.put('user.preferences', { theme: 'dark' }) |
| 284 | */ |
| 285 | put(key: string, value: AllowedSessionValues) { |
| 286 | this.#getValuesStore('write').set(key, value) |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | * Checks if a key exists inside the datastore |