(id?: string, session?: Session)
| 349 | |
| 350 | // determine if session should be saved to store |
| 351 | function shouldSave(id?: string, session?: Session) { |
| 352 | // cannot set cookie without a session ID |
| 353 | if (typeof id !== 'string' || !session) return false |
| 354 | |
| 355 | return !saveUninitialized && cookieId !== id ? isModified(session) : !isSaved(session) |
| 356 | } |
| 357 | |
| 358 | // determine if session should be touched |
| 359 | const shouldTouch = (id?: string, session?: Session) => |
no test coverage detected