1
0

move identity function to utils

This commit is contained in:
2025-06-07 09:31:17 +02:00
parent afa4c8a684
commit 637991c394
4 changed files with 8 additions and 8 deletions

View File

@@ -12,6 +12,10 @@ export function asArray<T>(iterable: Iterable<T>) {
return Array.isArray(iterable) ? <T[]>iterable : Array.from(iterable);
}
export function identity<T>(obj: T) {
return obj;
}
class WrappedAsyncIterator<T> implements AsyncIterable<T> {
readonly #iterator: AsyncIterator<T>;