MCPcopy Create free account
hub / github.com/adonisjs/session / shouldFlashValue

Method shouldFlashValue

src/session.ts:182–187  ·  view source on GitHub ↗

* Determines whether a value should be stored in flash messages. * Objects can opt out by setting a STORE_IN_FLASH symbol property to false. * * @param value - Value to check for flash storage eligibility

(value: unknown)

Source from the content-addressed store, hash-verified

180 * @param value - Value to check for flash storage eligibility
181 */
182 protected shouldFlashValue(value: unknown) {
183 if (value && typeof value === 'object') {
184 return STORE_IN_FLASH in value ? value[STORE_IN_FLASH] : true
185 }
186 return true
187 }
188
189 /**
190 * Filters flash data to only include values that should be flashed.

Callers 4

cleanupFlashDataMethod · 0.95
flashMethod · 0.95
flashExceptMethod · 0.95
flashOnlyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected