UNPKG

@lou.codes/iterables

Version:
20 lines (19 loc) 557 B
import type { IsomorphicIterable, Numeric } from "@lou.codes/types"; /** * Drop the specified amount of items from the given iterable or asynchronous * iterable. * * @category Asynchronous Generators * @example * ```typescript * const drop2 = drop(2); * drop2([1, 2, 3, 4, 5]); // [3, 4, 5] * ``` * @param amount Amount of items to drop. * @returns Curried function with `amount` in context. */ export declare const drop: ( amount: Numeric, ) => <Item>( iterable: IsomorphicIterable<Item>, ) => Readonly<AsyncIterableIterator<Awaited<Item>>>;