Skip to content

Asycnhronous evaluation #225

Open
Open
@m-nab

Description

@m-nab

Hi,

Would it be possible to add a Asynchronous evaluator ? I am currently using this libray to call a couple of functions dynamically, however I do have a a couple of functions which are asynchronous in nature. Since the evaluation happens instantly, it immediately resolves the pending promise instead of the value.

So the case would be something like this;

Parser.functions.AsyncCall1 = async function() { const res  = await api.getAmount(); return res; }
Parser.functions.AsyncCall2 = async function() { const res  = await api.getAmount(); return res; }

Parser.evaluateAsync('AsyncCall1() + AsyncCall2()');

Although I do realize this was not the intended use-case.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions