Checks if an array context value contains a specific item or matches a predicate.
Token representing an array in the context
Either the exact value to find, or a predicate function to test items
true if the array contains the value or matches the predicate, false otherwise
Checks if a context value exists (is present in the context).
Token representing the value to check
true if the value exists, false otherwise
Retrieves a context value, or null if not found.
Token representing the value to retrieve
The context value, or null if not found
Retrieves a context value with a fallback default value.
Returns the stored value if it exists, otherwise returns the provided default. The default value can be a direct value or a lazily-evaluated function.
Token representing the value to retrieve
The default value to return if not found (can be a function)
The context value, or the default value if not found
Retrieves a context value, throwing an error if not found.
Use this when you expect the value to be present and want to fail fast if it's missing.
Token representing the value to retrieve
The context value
Checks if a context value is missing (not present in the context).
Token representing the value to check
true if the value is missing, false if it exists
IMPORT_PATH:
"@daiso-tech/core/execution-context/contracts"Read-only contract for accessing execution context values.
This contract provides methods to retrieve values stored in the execution context. It does not allow modifications, making it suitable for passing as a read-only view of the context to functions that should only inspect values, not modify them.