champollion.parser.js_function

champollion.parser.js_function.fetch_environment(content, module_id)[source]

Return function environment dictionary from content.

module_id represent the identifier of the module.

The environment is in the form of:

{
    "moduleName.doSomething": {
        "id": "moduleName.doSomething",
        "module_id": "moduleName",
        "exported": False,
        "default": False,
        "name": "doSomething",
        "anonymous": False,
        "generator": False,
        "arguments": ["argument1", "argument2"],
        "line_number": 2,
        "description": "Function doc.\n\nDetailed description."
    }
}