新增: - backend/venv/ - Python 虚拟环境 - backend/start.sh - 启动脚本(使用虚拟环境) - backend/requirements.txt - 依赖列表 - .gitignore - 忽略虚拟环境和缓存文件 说明: - 每个项目使用独立虚拟环境 - 避免依赖冲突 - 启动脚本自动创建和激活虚拟环境
21 lines
756 B
JavaScript
21 lines
756 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = extractValueFromOptionalCallExpression;
|
|
/**
|
|
* Extractor function for a OptionalCallExpression type value node.
|
|
* A member expression is accessing a property on an object `obj.property` and invoking it.
|
|
*
|
|
* @param - value - AST Value object with type `OptionalCallExpression`
|
|
* @returns - The extracted value converted to correct type
|
|
* and maintaing `obj.property?.()` convention.
|
|
*/
|
|
function extractValueFromOptionalCallExpression(value) {
|
|
// eslint-disable-next-line global-require
|
|
var getValue = require('.').default;
|
|
return getValue(value.callee) + '?.(' + value.arguments.map(function (x) {
|
|
return getValue(x);
|
|
}).join(', ') + ')';
|
|
} |