champollion.parser.js_data

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

Return data environment dictionary from content.

module_id represent the identifier of the module.

The environment is in the form of:

{
    "moduleName.DATA": {
        "id": "moduleName.DATA",
        "module_id": "moduleName",
        "exported": False,
        "default": False,
        "name": "DATA",
        "value": "42",
        "type": "const",
        "line_number": 2,
        "description": "Variable doc.\n\nDetailed description."
    }
}