deno.land / x / lume@v2.1.4 / tests / assets / module / multiple-async.page.js

multiple-async.page.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export const tags = "autogenerated";export const layout = "layout.js";
export default async function* () { const pages = [1, 2];
for (const num of pages) { yield new Promise((res) => setTimeout(() => res({ title: `Multiple page ${num}`, url: (page) => `/async/${page.data.num}/`, content: `Async Page ${num}`, num, }), 100) ); }}
lume

Version Info

Tagged at
7 months ago