1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Add comments

This commit is contained in:
Adria Navarro 2024-02-07 15:18:17 +01:00
parent ec5e533063
commit b8ebeff71c

View file

@ -22,6 +22,11 @@ class ScriptRunner {
})
if (parseBson) {
// If we need to parse bson, we follow the next steps:
// 1. Serialise the data from potential BSON to buffer before passing it to the isolate
// 2. Deserialise the data within the isolate, to get the original data
// 3. Process script
// 4. Stringify and parse result in order to convert the result from BSON to json
script = `return JSON.parse(JSON.stringify((function(){data=deserialize(data).data;${script}})()));`
}