Sha256: efadd14f04447e1b44ec2f79c6e9de6fc5a9c007bca43a1016ac5c79c9508d33
Contents?: true
Size: 566 Bytes
Versions: 9
Compression:
Stored size: 566 Bytes
Contents
/** * Extractor function for a OptionalMemberExpression type value node. * A member expression is accessing a property on an object `obj.property`. * * @param - value - AST Value object with type `OptionalMemberExpression` * @returns - The extracted value converted to correct type * and maintaing `obj?.property` convention. */ export default function extractValueFromOptionalMemberExpression(value) { // eslint-disable-next-line global-require const getValue = require('.').default; return `${getValue(value.object)}?.${getValue(value.property)}`; }
Version data entries
9 entries across 9 versions & 2 rubygems