async function popFunction(data) {
    if (!data) {
        return null;
    }

    try {
        let arrowFunction = data.split(new RegExp(`(\\s*\\n*\\t*\\([\\s\\S]*\\)\\s*\\t*=>\\s*\\n*\\t*\\{)`)); // arrow function with '{' and '}'
        let arrowFunctionWithoutCurlyBracket = [''];
        let traditionalFunction = [''];

        if (arrowFunction.length == 1) {
            arrowFunctionWithoutCurlyBracket = data.split(new RegExp(`(\\s*\\n*\\t*\\([\\s\\S]*\\)\\s*\\t*=>)`)); // arrow function without '{' and '}'
            if (arrowFunctionWithoutCurlyBracket.length == 1) {
                traditionalFunction = data.split(new RegExp(`(\\s*\\n*\\t*\\([\\s\\S]*\\)\\s*\\n*\\t*\\:?\\s*\\n*\\t*\\w*\\s*\\n*\\t*\\<?\\s*\\n*\\t*\\w*\\s*\\n*\\t*\\>?\\s*\\n*\\t*\\{)`)); // traditional function with '{' and '}'
            }
        }

        let isArrowFunction = false;
        let isArrowFunctionWithoutCurlyBracket = false;
        let isTraditionalFunction = false;

        if (arrowFunction.length > 1) {
            isArrowFunction = true;
        } else if (arrowFunctionWithoutCurlyBracket.length > 1) {
            isArrowFunctionWithoutCurlyBracket = true;
        } else if (traditionalFunction.length > 1) {
            isTraditionalFunction = true;
        }

        if (isArrowFunction || isTraditionalFunction) {
            let signatureFunc = '';
            let func = data.split('{');
            let params = func[0];
            params = params.split('').reverse().join('');
            params = await utils.stack0SymbolRecognizer(params, ')', '(');

            if (params) {
                params = '(' + (params == ')' ? '' : params.split('').reverse().join('')) + ')';
                signatureFunc = params + func[0].split(params)[1] + '{';
            } else {
                // TODO: verify case without '(' and ')'
                signatureFunc = '{';
            }

            func.shift();
            func = func.join('{');
            func = signatureFunc + (await utils.stackSymbolRecognizer(func, '{', '}'));
            return func.trim();
        } else if (isArrowFunctionWithoutCurlyBracket) {
            let func = data.split('=>')[1].trimLeft();
            let params = await utils.stack0SymbolRecognizer(data, '(', ')');
            let paramsSubFunc = await utils.stack0SymbolRecognizer(func, '(', ')');
            func = func.split(paramsSubFunc)[0];
            func = '(' + params + ') => { ' + func + paramsSubFunc + ') }';
            return func;
        } else {
            return null;
        }
    } catch (err) {
        return null;
    }
}
Return the first function in a string.
@param {string} data content.