Utility function to handle empty query results and templates (#1386)

* Add global Lua function 'some'

Moved documentation for 'each' function to non-standard section.

* Revert "Add optional argument to template.each for empty collection output (#1359)"

This reverts commit b73dadec67.

* Reimplement #1359 using 'some' function
This commit is contained in:
Marek S. Łukasiewicz
2025-05-12 07:33:49 +02:00
committed by GitHub
parent 10e7cea08d
commit f2f4937854
9 changed files with 98 additions and 33 deletions
+4
View File
@@ -38,6 +38,10 @@ Deno.test("[Lua] JS tests", async () => {
await runLuaTest("./stdlib/js_test.lua");
});
Deno.test("[Lua] Global functions tests", async () => {
await runLuaTest("./stdlib/global_test.lua");
});
async function runLuaTest(luaPath: string) {
const luaFile = await Deno.readTextFile(
fileURLToPath(new URL(luaPath, import.meta.url)),