Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

extractValue.md

34 lines548 Bytes

function extractValue(expr): any;

Defined in: packages/db/src/query/expression-helpers.ts:130

Extracts the value from a Value expression. Returns undefined for non-value expressions.

Parameters

expr

BasicExpression

The expression to extract from

Returns

any

The extracted value

Example

const val = extractValue(someExpression)
// Returns: 'electronics'