Sha256: 6ba6d64d49f0a875d7e37a998a6a413a9b3138ce8020ddf2deda833db252f0e4
Contents?: true
Size: 504 Bytes
Versions: 8
Compression:
Stored size: 504 Bytes
Contents
/** * 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); }
Version data entries
8 entries across 8 versions & 2 rubygems