Hi,
I'd like to know whether Medini supports running asynchronous functions. For example, I tried a simple example as follows but it doesn't understand the "async" or "Promise" keywords.
async function myFunction() {
return "Hello";
}
myFunction().then(
function(value) {console.log(value)}
); The above example came back with a warning for missing ";" in front of async statement, which cannot be true as it's the first line.
const promise1 = new Promise((resolve, reject) => {
resolve('Success!');
});
promise1.then((value) => {
console.log(value);
// expected output: "Success!"
});
The above example came back with syntax error for the line const promise1 = new Promise((resolve, reject) => .
I would like to use await/promise because I would like to execute a specific function after forEach has finished. For example, for all the attacks with "applicable" selected I'd like to populate them to a separate collection (e.g. applicable_collection). After doing that, I'd like to check whether I have just deselected any attacks so I can delete attacks that were previously in the applicable_collection but have been deselected in this round. Deleting the entire applicable_collection then populating it is undesirable because all the traceability of the existing entries in applicable_collection are lost.