Files
NapCatQQ/.pnpm-store/v3/files/72/6904ebbb1a48ebe976964757b282184ab05593230aa2a788aa948d26f8a8d3b90e4f530f3dffbe513f6f489a70b99cf056860c0a756472414709a8370a5d4f
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
504 B
Plaintext

/**
* Extractor function for a ConditionalExpression type value node.
*
* @param - value - AST Value object with type `ConditionalExpression`
* @returns - The extracted value converted to correct type.
*/
export default function extractValueFromConditionalExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
const {
test,
alternate,
consequent,
} = value;
return getValue(test) ? getValue(consequent) : getValue(alternate);
}