dotfiles/vscode/.vscode/extensions/njpwerner.autodocstring-0.6.1/out/parse/get_function_name.js
Errol Sancaktar ff17c17e23 vscode
2024-06-14 09:31:58 -06:00

13 lines
451 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFunctionName = void 0;
function getFunctionName(functionDefinition) {
const pattern = /(?:def|class)\s+(\w+)\s*\(/;
const match = pattern.exec(functionDefinition);
if (match == undefined || match[1] == undefined) {
return "";
}
return match[1];
}
exports.getFunctionName = getFunctionName;
//# sourceMappingURL=get_function_name.js.map