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

14 lines
577 B
Plaintext

/**
* Extractor function for a AssignmentExpression type value node.
* An assignment expression looks like `x = y` or `x += y` in expression position.
* This will return the assignment as the value.
*
* @param - value - AST Value object with type `AssignmentExpression`
* @returns - The extracted value converted to correct type.
*/
export default function extractValueFromAssignmentExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
return `${getValue(value.left)} ${value.operator} ${getValue(value.right)}`;
}