UNPKG

248 BJavaScriptView Raw
1export async function elementAt(source, index) {
2 let i = index;
3 for await (const item of source) {
4 if (i === 0) {
5 return item;
6 }
7 i--;
8 }
9 return undefined;
10}
11
12//# sourceMappingURL=elementat.mjs.map