UNPKG

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