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

14 lines
569 B
Plaintext

/**
* Extractor function for a MemberExpression type value node.
* A member expression is accessing a property on an object `obj.property`.
*
* @param - value - AST Value object with type `MemberExpression`
* @returns - The extracted value converted to correct type
* and maintaing `obj.property` convention.
*/
export default function extractValueFromMemberExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
return `${getValue(value.object)}${value.optional ? '?.' : '.'}${getValue(value.property)}`;
}