function jsParser(data) {
    try {
        let jsObj = { variables: [] };
        const parse = Parser.parse(data, { ecmaVersion: 2020 });
        let variablesNode = getVariablesNode(parse);

        // Get variables
        for (let idx = 0; idx < variablesNode.length; ++idx) {
            let item = variablesNode[idx];
            if (item && item.declarations && item.declarations[0].type === 'VariableDeclarator') {
                let name = item.declarations[0].id.name;
                let end = item.declarations[0].end; // bytePosition of the last byte
                let value = resolveVariableValue(item.declarations[0].init, jsObj.variables);
                jsObj.variables.push({ name, end, kind: item.kind, typeof: typeof value, value });
            }
        }
        return jsObj;
    } catch (err) {
        return null;
    }
}
Parse a JavaScript content.
It get only the variables. In the future, it will get other patterns.

@param {string} data content
@returns